zfill

simple function to pad a number with zeroes

npm install zfill
120 downloads in the last day
158 downloads in the last week
208 downloads in the last month

zfill

Usage

var zfill = require('zfill');

console.log(zfill(9, 2)); // prints '09'
console.log(zfill(1234, 3)); // prints '1234'
npm loves you