1.0.1 • Published 6 years ago
@magnetar/padnumber v1.0.1
This will simply pad number with zeros and will return string
npm i @magnetar/padnumber
Type | Description | Required |
---|---|---|
Anything | Number on which padding will be applied | Yes |
Number | Width of result | Yes |
const padNumber = require('@magnetar/padnumber')l;
padNumber(100, 5); // returns 000100
padNumber(100, 2); // returns 100