function zpad(length, n) {
  var result = '' + n;
  while (result.length < length) {
    result = '0' + result;
  }
  return result;
}
Will pad n with `0` up until length.

@example
    zpad(16, '1234');
    // => 0000000000001234

@param {number} length
@param {(string|number)} n
@returns {string}