{"_id":"add-line-numbers","_rev":"4-afa9bac5abcf6911a2b6a6f7812ba9b5","name":"add-line-numbers","description":"adds line numbers to a source string","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"add-line-numbers","version":"1.0.0","description":"adds line numbers to a source string","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"pad-left":"^1.0.2"},"devDependencies":{"faucet":"0.0.1","get-stdin":"^4.0.1","tape":"^4.0.0"},"scripts":{"test":"node test.js | faucet"},"keywords":["add","line","numbers","pad","left","padding","pads","space","indent","num"],"repository":{"type":"git","url":"git://github.com/Jam3/add-line-numbers.git"},"homepage":"https://github.com/Jam3/add-line-numbers","bugs":{"url":"https://github.com/Jam3/add-line-numbers/issues"},"gitHead":"e25f90c9b7edf46d96694d9c71b4c50a892e8251","_id":"add-line-numbers@1.0.0","_shasum":"c1c85ba80cb3ea63adbfd7892157a36b5deacefd","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"c1c85ba80cb3ea63adbfd7892157a36b5deacefd","tarball":"https://registry.npmjs.org/add-line-numbers/-/add-line-numbers-1.0.0.tgz","integrity":"sha512-kGD1UkVwj2YKEYYZoAGUiGvCnOQ4WYqA4XKMcBR9j+78d26jsx+ndIjQAen238BFNk+15lbs3ZHLDRlLHyuUJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDB56enjSockFRfVO5epQ12oJyMb/ozDalkaezRfTvQrAiEA2tBnGBwBqWQ7VALL7q5LzJ6w8DAmzvyh78td54QZIyA="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]},"1.0.1":{"name":"add-line-numbers","version":"1.0.1","description":"adds line numbers to a source string","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"pad-left":"^1.0.2"},"devDependencies":{"faucet":"0.0.1","get-stdin":"^4.0.1","tape":"^4.0.0"},"scripts":{"test":"node test.js | faucet"},"keywords":["add","line","numbers","pad","left","padding","pads","space","indent","num"],"repository":{"type":"git","url":"git://github.com/Jam3/add-line-numbers.git"},"homepage":"https://github.com/Jam3/add-line-numbers","bugs":{"url":"https://github.com/Jam3/add-line-numbers/issues"},"gitHead":"f29c9dbecfb3fb5b8b9ab3f6fa4ef0593f3b0d42","_id":"add-line-numbers@1.0.1","_shasum":"48dbbdea47dbd234deafeac6c93cea6f70b4b7e3","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"48dbbdea47dbd234deafeac6c93cea6f70b4b7e3","tarball":"https://registry.npmjs.org/add-line-numbers/-/add-line-numbers-1.0.1.tgz","integrity":"sha512-w+2a1malCvWwACQFBpZ5/uwmHGaGYT+aGIxA8ONF5vlhe6X/gD3eR8qVoLWa+5nnWAOq2LuPbrqDYqj1pn0WMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd/mo//J/9WNSe8NjQjR8luStx0L0P4l5lCWW2uM91IwIhALK1Q/OFqfPxA6HitED6gUbijovKqmzVr1wKxNQF8wOB"}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]}},"readme":"# add-line-numbers\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nAdds line numbers to a source string, padding left and starting at the given offset.\n\n## Example\n\n#### example.js\n\n```js\nvar addLineNumbers = require('add-line-numbers')\nvar stdin = require('get-stdin')\n\nstdin(function (body) {\n  var src = addLineNumbers(body.toString())\n  process.stdout.write(src + '\\n')\n})\n```\n\nNow run the following in bash:\n\n```sh\nnode example.js < some-file.js\n```\n\nResulting output:\n\n```js\n 1: var addLineNumbers = require('./')\n 2: var test = require('tape')\n 3: \n 4: test('adds line numbers to a source string', function (t) {\n 5:   t.equal(addLineNumbers([\n 6:     'one',\n 7:     'is second'\n 8:   ].join('\\r\\n')), '1: one\\n2: is second', 'return carriage')\n 9: \n10:   t.equal(addLineNumbers([\n11:     'one',\n12:     'is second'\n13:   ].join('\\n'), 0), '0: one\\n1: is second', 'start offset')\n14: \n...\n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/add-line-numbers.png)](https://www.npmjs.com/package/add-line-numbers)\n\n#### `str = addLineNumbers(str, start, delimiter)`\n\nAdds a number to the start of each line in the `str` text. \n\n- `start` (Number) number to start counting at, defaults to 1\n- `delimiter` (String) joins the number and line, defaults to `\": \"`\n\nReturns the transformed string.\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/Jam3/add-line-numbers/blob/master/LICENSE.md) for details.\n","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2022-06-13T02:25:28.899Z","created":"2015-06-23T21:23:56.658Z","1.0.0":"2015-06-23T21:23:56.658Z","1.0.1":"2015-06-23T21:25:03.451Z"},"homepage":"https://github.com/Jam3/add-line-numbers","keywords":["add","line","numbers","pad","left","padding","pads","space","indent","num"],"repository":{"type":"git","url":"git://github.com/Jam3/add-line-numbers.git"},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"bugs":{"url":"https://github.com/Jam3/add-line-numbers/issues"},"license":"MIT","readmeFilename":"README.md"}