{"_id":"split-lines","_rev":"78547","name":"split-lines","description":"Split lines into an array of lines","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-06-03T10:25:11.000Z","created":"2014-06-28T14:43:50.695Z","3.0.0":"2021-04-08T17:49:34.475Z","2.1.0":"2021-03-24T14:18:04.796Z","2.0.0":"2018-05-18T03:46:31.651Z","1.1.0":"2016-05-23T07:14:00.119Z","1.0.0":"2014-08-13T13:27:09.448Z","0.1.0":"2014-06-28T14:43:50.695Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-lines.git"},"versions":{"3.0.0":{"name":"split-lines","version":"3.0.0","description":"Split lines into an array of lines","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-lines.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["split","lines","line","string","str","newline","newlines","linebreak","line-break","lf","crlf","eol","linefeed"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"149eec42a2e946321ea2b2e5cc6b2df9a4c04653","bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"homepage":"https://github.com/sindresorhus/split-lines#readme","_id":"split-lines@3.0.0","_nodeVersion":"15.12.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b7ce0d1a853ed73e1f6963c95e31d8f6e957ad69","size":1837,"noattachment":false,"key":"/split-lines/-/split-lines-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/split-lines/download/split-lines-3.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-lines_3.0.0_1617904174351_0.9095114951173666"},"_hasShrinkwrap":false,"publish_time":1617904174475,"_cnpm_publish_time":1617904174475},"2.1.0":{"name":"split-lines","version":"2.1.0","description":"Split lines into an array of lines","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-lines.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["split","lines","line","string","str","newline","newlines","linebreak","line-break","lf","crlf","eol","linefeed"],"devDependencies":{"ava":"^2.4.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"1b72066a10ff8d6ea6ae76dc36a854c2dd039854","bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"homepage":"https://github.com/sindresorhus/split-lines#readme","_id":"split-lines@2.1.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3bc9dbf75637c8bae6ed5dcbc7dbd83956b72311","size":1874,"noattachment":false,"key":"/split-lines/-/split-lines-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/split-lines/download/split-lines-2.1.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-lines_2.1.0_1616595484613_0.8851981261580499"},"_hasShrinkwrap":false,"publish_time":1616595484796,"_cnpm_publish_time":1616595484796},"2.0.0":{"name":"split-lines","version":"2.0.0","description":"Split lines into an array of lines","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-lines.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["split","lines","line","string","str","newline","newlines","linebreak","line-break","lf","crlf","eol","linefeed"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"90cf33bab631939ae21f96346aa684358f81dd61","bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"homepage":"https://github.com/sindresorhus/split-lines#readme","_id":"split-lines@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"13f42cdf8cf0d3f5d3fed797b80986168c06defc","size":1757,"noattachment":false,"key":"/split-lines/-/split-lines-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/split-lines/download/split-lines-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-lines_2.0.0_1526615191505_0.5277035521988833"},"_hasShrinkwrap":false,"publish_time":1526615191651,"_cnpm_publish_time":1526615191651},"1.1.0":{"name":"split-lines","version":"1.1.0","description":"Split lines into an array of lines","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-lines.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["split","lines","line","string","str","newline","newlines","linebreak","line-break","lf","crlf","eol","linefeed"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"33cb89edd544d80af725d0ff0a20b2bc5a4cffac","bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"homepage":"https://github.com/sindresorhus/split-lines#readme","_id":"split-lines@1.1.0","_shasum":"3abba8f598614142f9db8d27ab6ab875662a1e09","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3abba8f598614142f9db8d27ab6ab875662a1e09","size":1767,"noattachment":false,"key":"/split-lines/-/split-lines-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/split-lines/download/split-lines-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/split-lines-1.1.0.tgz_1463987639701_0.37551645492203534"},"directories":{},"publish_time":1463987640119,"_cnpm_publish_time":1463987640119,"_hasShrinkwrap":false},"1.0.0":{"name":"split-lines","version":"1.0.0","description":"Split lines into an array of lines","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/split-lines"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["string","str","split","newline","linebreak","line-break","line","lines","lf","crlf","eol","linefeed"],"devDependencies":{"mocha":"*"},"gitHead":"25a3c3a74632fc64572fe29583616f5a4bf13f2f","bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"homepage":"https://github.com/sindresorhus/split-lines","_id":"split-lines@1.0.0","_shasum":"f3fcaaa3d807367eb880b516b2125f6599aac125","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"f3fcaaa3d807367eb880b516b2125f6599aac125","size":775,"noattachment":false,"key":"/split-lines/-/split-lines-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/split-lines/download/split-lines-1.0.0.tgz"},"directories":{},"publish_time":1407936429448,"_cnpm_publish_time":1407936429448,"_hasShrinkwrap":false},"0.1.0":{"name":"split-lines","version":"0.1.0","description":"Split lines into an array of lines","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/split-lines"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["string","str","split","newline","linebreak","line-break","line","lines","lf","crlf","eol","linefeed"],"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"homepage":"https://github.com/sindresorhus/split-lines","_id":"split-lines@0.1.0","_shasum":"0b964fb76419ac1df9fd39c704e9703374633c73","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"0b964fb76419ac1df9fd39c704e9703374633c73","size":772,"noattachment":false,"key":"/split-lines/-/split-lines-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/split-lines/download/split-lines-0.1.0.tgz"},"directories":{},"publish_time":1403966630695,"_cnpm_publish_time":1403966630695,"_hasShrinkwrap":false}},"readme":"# split-lines\n\n> Split lines into an array of lines\n\n## Install\n\n```\n$ npm install split-lines\n```\n\n## Usage\n\n```js\nimport splitLines from 'split-lines';\n\nsplitLines('foo\\r\\nbar\\r\\nbaz\\nrainbow');\n//=> ['foo', 'bar', 'baz', 'rainbow']\n\nsplitLines('foo\\r\\nbar\\r\\nbaz\\nrainbow', {preserveNewlines: true});\n//=> ['foo\\r\\n', 'bar\\r\\n', 'baz\\n', 'rainbow']\n```\n\n## API\n\n### splitLines(string, options?)\n\n#### string\n\nType: `string`\n\nString to split.\n\n#### options\n\nType: `object`\n\n##### preserveNewlines\n\nType: `boolean`\\\nDefault: `false`\n\nPreserve the line separator at the end of every line, except the last line, which will never contain one.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/split-lines#readme","bugs":{"url":"https://github.com/sindresorhus/split-lines/issues"},"license":"MIT"}