index.js
function pad (num, padLen) {
  var padding = '0000';
  num = String(num);
  return padding.substring(0, padLen - num.length) + num;
}
function pad (num, padLen) {
  var padding = '0000';
  num = String(num);
  return padding.substring(0, padLen - num.length) + num;
}
function pad ( num , padLen ) { var padding = '0000' ; num = String ( num ) ; return padding . substring ( 0 , padLen - num . length ) + num ; }
Pads a number with 0s if required.
Pads a number with 0s if required .