{"name":"pad-left","description":"Left pad a string with zeros or a specified string. Fastest implementation.","version":"2.0.2","homepage":"https://github.com/jonschlinkert/pad-left","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pad-left.git"},"bugs":{"url":"https://github.com/jonschlinkert/pad-left/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"repeat-string":"^1.5.4"},"devDependencies":{"ansi-colors":"^0.1.0","benchmarked":"^0.1.5","gulp-format-md":"^0.1.7","left-pad":"^1.0.1","matched":"^0.4.1","should":"^8.2.2"},"keywords":["align","fill","left","pad","pad-left","padded","padding","spaces","string","zero","zero-fill","zeros"],"verb":{"run":true,"toc":false,"layout":"default","options":{"helper":{"copyright":{"start":2014}}},"tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["align-text","center-align","justified","pad-right","repeat-string","right-align","right-align-keys","right-align-values","right-pad-keys","right-pad-values","word-wrap"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"c4841d6f5c6809eed70539ebff2dd123ea9094f3","_id":"pad-left@2.0.2","_shasum":"8291d0d40c352c8b94a24f787eb582c9ae099b3d","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8291d0d40c352c8b94a24f787eb582c9ae099b3d","tarball":"http://registry-npm.ywwl.com/pad-left/download/pad-left-2.0.2.tgz","integrity":"sha512-bK9uH+ofeUcAnXp1vl2+AIGhFg2DjwjmrIYNsCjZVw8UsvwggIJmRGS6Xu+I7xanYWb9etuYEvqscRP39WJFHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP+l4LYDdH25+gao1ZpJbGLF3Gckf22T5Nq+CsERm4ygIhAKnkzisJT33/bH20yGZull6IMfVFSD+7UkCU+/0qW7Y8"}],"size":2735,"noattachment":false,"key":"/pad-left/-/pad-left-2.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/pad-left-2.0.2.tgz_1458700388297_0.5202980281319469"},"directories":{},"readme":"# pad-left [![NPM version](https://img.shields.io/npm/v/pad-left.svg?style=flat)](https://www.npmjs.com/package/pad-left) [![NPM downloads](https://img.shields.io/npm/dm/pad-left.svg?style=flat)](https://npmjs.org/package/pad-left) [![Build Status](https://img.shields.io/travis/jonschlinkert/pad-left.svg?style=flat)](https://travis-ci.org/jonschlinkert/pad-left)\n\nLeft pad a string with zeros or a specified string. Fastest implementation.\n\nYou might also be interested in [word-wrap](https://github.com/jonschlinkert/word-wrap).\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install pad-left --save\n```\n\n## Usage\n\n```js\nvar pad = require('pad-left');\npad(  '4', 4, '0') // 0004\npad( '35', 4, '0') // 0035\npad('459', 4, '0') // 0459\n```\n\n## Benchmarks\n\nBenchmarks for node.js v6.1.0 versus [left-pad](https://github.com/stevemao/left-pad).\n\n```sh\n# benchmark/fixtures/10-custom-char.js (37 bytes)\n  pad-left x 14,940,947 ops/sec ±0.81% (87 runs sampled)\n  left-pad x 7,901,604 ops/sec ±1.17% (86 runs sampled)\n\n# benchmark/fixtures/10.js (32 bytes)\n  pad-left x 13,305,123 ops/sec ±1.53% (84 runs sampled)\n  left-pad x 6,979,536 ops/sec ±1.13% (84 runs sampled)\n\n# benchmark/fixtures/100-custom-char.js (38 bytes)\n  pad-left x 14,227,637 ops/sec ±1.41% (81 runs sampled)\n  left-pad x 1,352,240 ops/sec ±1.51% (86 runs sampled)\n\n# benchmark/fixtures/100.js (34 bytes)\n  pad-left x 15,664,561 ops/sec ±0.99% (83 runs sampled)\n  left-pad x 1,247,316 ops/sec ±0.96% (87 runs sampled)\n\n# benchmark/fixtures/1000-custom-char.js (40 bytes)\n  pad-left x 15,210,294 ops/sec ±1.15% (87 runs sampled)\n  left-pad x 159,958 ops/sec ±1.01% (88 runs sampled)\n\n# benchmark/fixtures/1000.js (35 bytes)\n  pad-left x 14,157,425 ops/sec ±1.10% (88 runs sampled)\n  left-pad x 143,805 ops/sec ±1.08% (87 runs sampled)\n```\n\nBenchmarks for node.js v6.1.0 versus [stevemao/left-pad](https://github.com/stevemao/left-pad).\n\n```sh\n# benchmark/fixtures/10-custom-char.js (37 bytes)\n  pad-left x 13,251,037 ops/sec ±1.40% (84 runs sampled)\n  left-pad x 10,745,530 ops/sec ±1.18% (86 runs sampled)\n\n# benchmark/fixtures/10.js (32 bytes)\n  pad-left x 13,644,357 ops/sec ±1.33% (87 runs sampled)\n  left-pad x 20,107,245 ops/sec ±1.00% (88 runs sampled)\n\n# benchmark/fixtures/100-custom-char.js (38 bytes)\n  pad-left x 15,650,330 ops/sec ±1.01% (86 runs sampled)\n  left-pad x 9,706,877 ops/sec ±1.13% (87 runs sampled)\n\n# benchmark/fixtures/1000-custom-char.js (40 bytes)\n  pad-left x 17,255,593 ops/sec ±0.99% (88 runs sampled)\n  left-pad x 6,312,637 ops/sec ±1.16% (87 runs sampled)\n\n# benchmark/fixtures/1000.js (35 bytes)\n  pad-left x 15,679,410 ops/sec ±0.99% (90 runs sampled)\n  left-pad x 6,439,580 ops/sec ±1.08% (86 runs sampled)\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [align-text](https://www.npmjs.com/package/align-text): Align the text in a string. | [homepage](https://github.com/jonschlinkert/align-text)\n* [center-align](https://www.npmjs.com/package/center-align): Center-align the text in a string. | [homepage](https://github.com/jonschlinkert/center-align)\n* [justified](https://www.npmjs.com/package/justified): Wrap words to a specified length and justified the text. | [homepage](https://github.com/jonschlinkert/justified)\n* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right)\n* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string)\n* [right-align-keys](https://www.npmjs.com/package/right-align-keys): Right align the keys of an object. | [homepage](https://github.com/jonschlinkert/right-align-keys)\n* [right-align-values](https://www.npmjs.com/package/right-align-values): Right align the values of a given property for each object in an array. Useful… [more](https://www.npmjs.com/package/right-align-values) | [homepage](https://github.com/jonschlinkert/right-align-values)\n* [right-align](https://www.npmjs.com/package/right-align): Right-align the text in a string. | [homepage](https://github.com/jonschlinkert/right-align)\n* [right-pad-keys](https://www.npmjs.com/package/right-pad-keys): Right pad the keys of an object. | [homepage](https://github.com/jonschlinkert/right-pad-keys)\n* [right-pad-values](https://www.npmjs.com/package/right-pad-values): Right pad the values of a given property for each object in an array. Useful… [more](https://www.npmjs.com/package/right-pad-values) | [homepage](https://github.com/jonschlinkert/right-pad-values)\n* [word-wrap](https://www.npmjs.com/package/word-wrap): Wrap words to a specified length. | [homepage](https://github.com/jonschlinkert/word-wrap)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pad-left/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\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\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/pad-left/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 07, 2016._","publish_time":1458700399755,"_cnpm_publish_time":1458700399755,"dist-tags":{"latest":"2.1.0"}}