veffect
Version:
powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha
14 lines (11 loc) • 359 B
text/typescript
import type * as LogSpan from "../LogSpan.js"
/** @internal */
export const make = (label: string, startTime: number): LogSpan.LogSpan => ({
label,
startTime
})
/** @internal */
export const render = (now: number) => (self: LogSpan.LogSpan): string => {
const label = self.label.replace(/[\s="]/g, "_")
return `${label}=${now - self.startTime}ms`
}