MCPcopy
hub / github.com/flatpickr/flatpickr / pad

Function pad

src/utils/index.ts:1–2  ·  view source on GitHub ↗
(number: string | number, length = 2)

Source from the content-addressed store, hash-verified

1export const pad = (number: string | number, length = 2) =>
2 `000${number}`.slice(length * -1);
3export const int = (bool: boolean) => (bool === true ? 1 : 0);
4
5/* istanbul ignore next */

Callers 4

setHoursFunction · 0.90
buildTimeFunction · 0.90
timeWrapperFunction · 0.90
formatting.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected