MCPcopy Index your code
hub / github.com/TanStack/virtual / pad

Function pad

packages/virtual-core/src/utils.ts:44–50  ·  view source on GitHub ↗
(str: number | string, num: number)

Source from the content-addressed store, hash-verified

42 const resultFpsPercentage = resultEndTime / 16
43
44 const pad = (str: number | string, num: number) => {
45 str = String(str)
46 while (str.length < num) {
47 str = ' ' + str
48 }
49 return str
50 }
51
52 console.info(
53 `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,

Callers 1

memoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected