node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

zfill

simple function to pad a number with zeroes

zfill

var zfill = require('zfill');
 
console.log(zfill(9, 2)); // prints '09' 
console.log(zfill(1234, 3)); // prints '1234'