0.2.2 • Published 8 years ago
padzeros v0.2.2
#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