MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / createAlignedTextWidth

Function createAlignedTextWidth

packages/logger/src/log.ts:72–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72export function createAlignedTextWidth<T extends string>(): [
73 getPaddedText: (text: string) => T,
74 updateWidth: (text: string) => number,
75] {
76 let width = 0
77 return [text => text.padEnd(width) as T, text => (width = Math.max(text.length, width))]
78}
79
80export function paddedForEach<T, I extends string>(
81 list: readonly T[],

Callers 1

paddedForEachFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…