You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
function padNumber(input, width, paddingCharacter = 0) {
|
|
if (input == null) {
|
|
return '';
|
|
}
|
|
|
|
input = `${input}`;
|
|
return input.length >= width ? input : new Array(width - input.length + 1).join(paddingCharacter) + input;
|
|
}
|
|
|
|
export default padNumber;
|