padzeros
v0.2.2
Published
Returns a string padded with leading zeros
Downloads
4
Readme
#Pad Zeros The following function returns a string containing the formatted representation of a number padded with leading zeros.
Usage
var result;
result = padzeros(42,4); // returns "0042"
result = padzeros(42,2); // returns "42"
result = padzeros(5,4); // returns "0005"
Installation
$ npm install padzeros