Sha256: f1e304feaf36024ce9b8dcc48a3375f48c552e781a51e0e116136b3252f21d4d
Contents?: true
Size: 400 Bytes
Versions: 46
Compression:
Stored size: 400 Bytes
Contents
"use strict"; var pad = require("../../string/#/pad") , toPosInt = require("../to-pos-integer") , toFixed = Number.prototype.toFixed; module.exports = function (length/*, precision*/) { var precision; length = toPosInt(length); precision = toPosInt(arguments[1]); return pad.call(precision ? toFixed.call(this, precision) : this, "0", length + (precision ? 1 + precision : 0)); };
Version data entries
46 entries across 46 versions & 3 rubygems