add-zero
Add a leading zero to a number.
Install
Via npm:
$ npm install add-zero --save
Via Bower:
$ bower install add-zero --save
Usage
var addZero = ; ; // 05; // 10; // 005; // 100; // -05; // -005
API
addZero(value, [digits])
value
Type: number
(integer) or string
Value in which a leading zero should be added to.
digits
Type: number
Default: 2
Total number of digits or decimal places.
License
MIT © Rafael Rinaldi