1.0.1 • Published 6 years ago

@magnetar/padnumber v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

This will simply pad number with zeros and will return string

npm i @magnetar/padnumber
TypeDescriptionRequired
AnythingNumber on which padding will be appliedYes
NumberWidth of resultYes
const padNumber = require('@magnetar/padnumber')l;

padNumber(100, 5); // returns 000100
padNumber(100, 2); // returns 100