{"name":"digits","description":"Pad numbers with zeros. Automatically pad the number of digits based on the length of the array, or explicitly pass in the number of digits to use.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/digits","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/digits.git"},"bugs":{"url":"https://github.com/jonschlinkert/digits/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/digits/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"longest":"^0.2.1","pad-left":"^0.2.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["amount","digit","digits","helper","mixin","number","pad","padded","padding"],"_id":"digits@0.2.0","_shasum":"79f7fe84fd2ad6a752bb9902e679a354cb10391f","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"79f7fe84fd2ad6a752bb9902e679a354cb10391f","tarball":"http://registry-npm.ywwl.com/digits/download/digits-0.2.0.tgz","integrity":"sha512-XctjajLtwENvKL8BMZ2Or4bpFZvTT/IIkMoJmkj8i7jwWjDlIeJ3Kdna071PfJVXqP2StSAABJVduFcVgRSyqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICaiXYVBH5+v0LF7jrdsJPHqtkj/Ajg4KEgeav7LFyonAiEA4Fy7nxtMSwglXVnue+VfogHwkVhSCjQn+yq/+1cnEYk="}],"size":3630,"noattachment":false,"key":"/digits/-/digits-0.2.0.tgz"},"directories":{},"readme":"# digits [![NPM version](https://badge.fury.io/js/digits.svg)](http://badge.fury.io/js/digits)\n\n> Pad numbers with zeros. Automatically pad the number of digits based on the length of the array, or explicitly pass in the number of digits to use.\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i digits --save\n```\n\n## Run tests\n\n```bash\nnpm test\n```\n\n## Usage\n\n```js\nvar digits = require('digits');\n```\n\n## API\n### [digits](index.js#L37)\n\nLeft pad the given `value` with the specified `number` of zeros or alternate `character`.\n\n* `value` **{String}**    \n* `number` **{String}**    \n* `returns` **{String}** `character`  \n\n```js\ndigits('abc', 10);\n//=> '0000000000abc'\n\ndigits('abc', 10, '~');\n//=> '~~~~~~~~~~abc'\n```\n\n### [.each](index.js#L62)\n\nPad left pad each value in the given `array` to align with the longest item/number in the array. Zeros are used by default, but a custom `character` can be passed as the second argument.\n\n* `arr` **{Number}**: The array of values to pad.    \n* `len` **{Number}**: Amount to pad the number.    \n* `returns` **{String}**: Padded number  \n\n**Example**\n\n```js\ndigits.each([1, 100, 1000])\n//=> ['0001', '0100', '1000']\n\ndigits.each([a, bb, ccc], ' ')\n//=> ['  a', ' bb', 'ccc']\n```\n\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/digits/issues)\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2014 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb](https://github.com/assemble/verb) on December 05, 2014. To update, run `npm i -g verb && verb`._\n","publish_time":1417785211356,"_cnpm_publish_time":1417785211356,"dist-tags":{"latest":"0.2.0"}}