zfill

simple function to pad a number with zeroes

npm install zfill
6 downloads in the last day
25 downloads in the last week
63 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