Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
TheMysteryz/utilsThis is my helper functions
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
JSR Score
100%
Published
3 months ago (0.2.2)
/** * Format a number to a string with 2 digits * * @example * ```ts * import { formatDateZero } from './formatDateZero'; * * formatDateZero(1); // '01' * formatDateZero(12); // '12' * ``` * * @param nb number * @returns string */ export const formatDateZero = (nb: number): string => nb.toString().padStart(2, '0');