3 var pad = require('../../string/#/pad')
4 , toPosInt = require('../to-pos-integer')
6 , toFixed = Number.prototype.toFixed;
8 module.exports = function (length/*, precision*/) {
10 length = toPosInt(length);
11 precision = toPosInt(arguments[1]);
13 return pad.call(precision ? toFixed.call(this, precision) : this,
14 '0', length + (precision ? (1 + precision) : 0));