{"_id":"line-numbers","_rev":"11-b416426f2271106feb82a38f66b45783","name":"line-numbers","description":"Add line numbers to a string.","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"line-numbers","version":"0.1.0","author":{"name":"Simon Lydell"},"license":"MIT","description":"Add line numbers to a string.","keywords":["line","number","numbers","file","add","insert","gutter","column","each"],"repository":{"type":"git","url":"https://github.com/lydell/line-numbers"},"scripts":{"test":"mocha --ui tdd"},"devDependencies":{"mocha":"^2.0.1"},"dependencies":{"left-pad":"0.0.3"},"gitHead":"bb120569e8e5b25f115f8d94817dc9e3576ee73c","bugs":{"url":"https://github.com/lydell/line-numbers/issues"},"homepage":"https://github.com/lydell/line-numbers","_id":"line-numbers@0.1.0","_shasum":"1c2aa556a9325a1b9ea8e4efb667849af89b3ec2","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.33","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"dist":{"shasum":"1c2aa556a9325a1b9ea8e4efb667849af89b3ec2","tarball":"https://registry.npmjs.org/line-numbers/-/line-numbers-0.1.0.tgz","integrity":"sha512-CMMFPesqNWiSj89eaF3vPfuQ500WkfLP2OU+fZyqH6hxo2gYOVSpoOqgxdC/ZiVXKcNCq/ZSYqzhpDl3mj1bog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGj/tT0cr5zCP3DVQExRdQSxhy4yEAwFkD/C8eCyNk4fAiEAlN5cNGJ5L9PZebq6rkms5DvrMlovUDfozRdDefJ2CUE="}]},"deprecated":"Copy its ~20 LOC directly into your code instead.","directories":{}},"0.2.0":{"name":"line-numbers","version":"0.2.0","author":{"name":"Simon Lydell"},"license":"MIT","description":"Add line numbers to a string.","keywords":["line","number","numbers","file","add","insert","gutter","column","each"],"repository":{"type":"git","url":"https://github.com/lydell/line-numbers"},"scripts":{"test":"mocha --ui tdd"},"devDependencies":{"mocha":"^2.0.1"},"dependencies":{"left-pad":"0.0.3"},"gitHead":"eb82c0c3da335fbd80111b771a6a3e38d7f63900","bugs":{"url":"https://github.com/lydell/line-numbers/issues"},"homepage":"https://github.com/lydell/line-numbers","_id":"line-numbers@0.2.0","_shasum":"6bc028149440e570d495ab509692aa08bd779c6e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"dist":{"shasum":"6bc028149440e570d495ab509692aa08bd779c6e","tarball":"https://registry.npmjs.org/line-numbers/-/line-numbers-0.2.0.tgz","integrity":"sha512-wC1rUVNh6LmK/imDbCvrfB4qLLUiMuLWvihs+twrERITLhc6aBMIb2+0TqL03sZLuKuO5aRoYTw5wcNCe0d7mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7aoI9/P8SmS4nH8IWTBE8Pse4VN6yygefkjYiINJ4dAiBCZUCOKbV58N/yioAFsw+ctfEcxNqRkOrsve0eB3JFgQ=="}]},"deprecated":"Copy its ~20 LOC directly into your code instead.","directories":{}},"0.2.1":{"name":"line-numbers","version":"0.2.1","author":{"name":"Simon Lydell"},"license":"MIT","description":"Add line numbers to a string.","keywords":["line","number","numbers","file","add","insert","gutter","column","each"],"repository":{"type":"git","url":"git+https://github.com/lydell/line-numbers.git"},"scripts":{"test":"mocha --ui tdd"},"devDependencies":{"mocha":"^2.0.1"},"dependencies":{"left-pad":"^1.0.1"},"gitHead":"b3205b3d0f3abc51db83e9f4cbd1111de4c4a3e2","bugs":{"url":"https://github.com/lydell/line-numbers/issues"},"homepage":"https://github.com/lydell/line-numbers#readme","_id":"line-numbers@0.2.1","_shasum":"2267e7fc09dd686c8d0641e4f8ff81a5ff141d66","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"dist":{"shasum":"2267e7fc09dd686c8d0641e4f8ff81a5ff141d66","tarball":"https://registry.npmjs.org/line-numbers/-/line-numbers-0.2.1.tgz","integrity":"sha512-2ajJH4OA9emcn3ibHuzf7PK+slZyalIvmQLcT5/a7EwomA66d0dqDl4iniky34mUYEGSysTnZocrksx8nQw0xg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy02rI0AD2v0LBNTBOzMEPfQb3ABvflgdkF8XE34aJMQIgXRoXZX9FZy1WyndDMnfl8gt/Gti//bZMRu0NWA2cXDI="}]},"maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/line-numbers-0.2.1.tgz_1458757980519_0.4218653291463852"},"deprecated":"Copy its ~20 LOC directly into your code instead.","directories":{}},"0.2.2":{"name":"line-numbers","version":"0.2.2","author":{"name":"Simon Lydell"},"license":"MIT","description":"Add line numbers to a string.","keywords":["line","number","numbers","file","add","insert","gutter","column","each"],"repository":{"type":"git","url":"git+https://github.com/lydell/line-numbers.git"},"scripts":{"test":"mocha --ui tdd"},"devDependencies":{"mocha":"^2.0.1"},"dependencies":{"left-pad":"^1.0.1"},"gitHead":"2938da4a39ba5274063d4ee6acbb869f5b58dd85","bugs":{"url":"https://github.com/lydell/line-numbers/issues"},"homepage":"https://github.com/lydell/line-numbers#readme","_id":"line-numbers@0.2.2","_shasum":"e6aa334440a08601be30386cfdd0341d4f8eb61d","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"dist":{"shasum":"e6aa334440a08601be30386cfdd0341d4f8eb61d","tarball":"https://registry.npmjs.org/line-numbers/-/line-numbers-0.2.2.tgz","integrity":"sha512-Oc87vy9HF1MEHKC9XZOv+Jks3gMb5eYpOGaBnTEipOsG7bliqJFowu2Ttytu54xtUoZwkqcbLI4LHRQM/loKKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFvJahTevphZwKO14eHuYmoQX3JqwcW47VC/tUxanqd2AiEAtrpcYhjLn3hMzEiiU2D3t7E9/t3F5lHKPCfSsQdTtc8="}]},"maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/line-numbers-0.2.2.tgz_1458758510294_0.8761831393931061"},"deprecated":"Copy its ~20 LOC directly into your code instead.","directories":{}}},"readme":"Overview [![Build Status](https://travis-ci.org/lydell/line-numbers.svg?branch=master)](https://travis-ci.org/lydell/line-numbers)\n========\n\n**DEPRECATED.** This is a rather silly package that I do not recommend using.\nIt's easier to copy the ~20 lines of code of this package and customize that\ncode, rather than downloading and learning how to use this package.\n\nAdd line numbers to a string.\n\n```js\nvar lineNumbers = require(\"line-numbers\")\n\nvar string = [\n  \"function sum(a, b) {\",\n  \"  return a + b;\",\n  \"}\"\n].join(\"\\n\")\n\nlineNumbers(string)\n// 1 | function sum(a, b) {\n// 2 |   return a + b;\n// 3 | }\n```\n\n\nInstallation\n============\n\n- `npm install line-numbers`\n\n```js\nvar lineNumbers = require(\"line-numbers\")\n```\n\n\nUsage\n=====\n\n### `lineNumbers(code, [options])` ###\n\nInserts a line number at the beginning of each line in `code`, which is either a\nstring or an array of strings—one for each line. All the line numbers are of the\nsame width; shorter numbers are padded on the left side.\n\nThe return value is of the same type as `code`.\n\n`options`:\n\n- start: `Number`. The number to use for the first line. Defaults to `1`.\n- padding: `String`. The character to pad numbers with. Defaults to `\" \"`.\n- before: `String`. String to put before the line number. Defaults to `\" \"`.\n- after: `String`. String to put between the line number and the line itself.\n  Defaults to `\" | \"`.\n- transform: `Function`. It is called for each line and passed an object with\n  the following properties:\n\n  - before: `options.before`\n  - number: `Number`. The current line number.\n  - width: `Number`. The padded width of the line numbers.\n  - after: `options.after`\n  - line: `String`. The current line.\n\n  You may modify the above properties to alter the line numbering for the\n  current line. This is useful if `before` and `after` aren’t enough, if you\n  want to colorize the line numbers, or highlight the current line.\n\n\nLicense\n=======\n\n[The X11 (“MIT”) License](LICENSE).\n","maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"time":{"modified":"2022-06-19T12:28:46.101Z","created":"2014-12-20T22:35:34.775Z","0.1.0":"2014-12-20T22:35:34.775Z","0.2.0":"2015-02-21T17:50:40.075Z","0.2.1":"2016-03-23T18:33:02.851Z","0.2.2":"2016-03-23T18:41:52.839Z"},"homepage":"https://github.com/lydell/line-numbers#readme","keywords":["line","number","numbers","file","add","insert","gutter","column","each"],"repository":{"type":"git","url":"git+https://github.com/lydell/line-numbers.git"},"author":{"name":"Simon Lydell"},"bugs":{"url":"https://github.com/lydell/line-numbers/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"saitodisse":true,"almaclaine":true}}