UNPKG

@snups/rjsf-utils

Version:
8 lines (7 loc) 399 B
/** Returns a string representation of the `num` that is padded with leading "0"s if necessary * * @param num - The number to pad * @param width - The width of the string at which no lead padding is necessary * @returns - The number converted to a string with leading zero padding if the number of digits is less than `width` */ export default function pad(num: number, width: number): string;