{"_id":"normalize-newline","_rev":"2971603","name":"normalize-newline","description":"Normalize the newline characters in a string to `\\n`","dist-tags":{"latest":"4.1.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2023-05-22T08:58:15.000Z","created":"2014-06-28T15:00:19.047Z","4.1.0":"2021-05-09T13:06:51.495Z","4.0.0":"2021-04-07T08:04:17.656Z","3.0.0":"2016-09-06T12:35:43.571Z","2.1.0":"2016-09-06T12:31:19.415Z","2.0.0":"2015-12-22T23:02:30.133Z","1.0.2":"2015-02-16T17:58:04.058Z","1.0.1":"2014-08-17T23:41:31.504Z","1.0.0":"2014-08-14T18:05:12.065Z","0.1.0":"2014-06-28T15:00:19.047Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/normalize-newline.git"},"versions":{"4.1.0":{"name":"normalize-newline","version":"4.1.0","description":"Normalize the newline characters in a string to `\\n`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/normalize-newline.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":["newline","linebreak","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"dependencies":{"replace-buffer":"^1.2.1"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.40.0"},"gitHead":"65af4cfcbb1efaf798909b019e97e604cd4aa35c","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline#readme","_id":"normalize-newline@4.1.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"47576ac687846b67bf1c163e938f1f00a8bacfcb","size":1694,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-4.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalize-newline_4.1.0_1620565611356_0.3797487371932955"},"_hasShrinkwrap":false,"publish_time":1620565611495,"_cnpm_publish_time":1620565611495,"_cnpmcore_publish_time":"2021-12-16T14:48:23.693Z"},"4.0.0":{"name":"normalize-newline","version":"4.0.0","description":"Normalize the newline characters in a string to `\\n`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/normalize-newline.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"},"keywords":["newline","linebreak","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"dependencies":{"replace-buffer":"^1.2.1"},"devDependencies":{"ava":"^3.15.0","xo":"^0.38.2"},"gitHead":"8dfc8698eadb7dbdc68a479bb380decde8cf9428","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline#readme","_id":"normalize-newline@4.0.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f17102d95a59c99d8dfed7d9a4b17432ed15d7fc","size":1627,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-4.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/normalize-newline_4.0.0_1617782657534_0.7275315000701335"},"_hasShrinkwrap":false,"publish_time":1617782657656,"_cnpm_publish_time":1617782657656,"_cnpmcore_publish_time":"2021-12-16T14:48:23.901Z"},"3.0.0":{"name":"normalize-newline","version":"3.0.0","description":"Normalize the newline characters in a string to `\\n`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/normalize-newline.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["newline","linebreak","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"9fa5b93d3118ea48c119d61b2fc2de9957081ff9","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline#readme","_id":"normalize-newline@3.0.0","_shasum":"1cbea804aba436001f83938ab21ec039d69ae9d3","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.4.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1cbea804aba436001f83938ab21ec039d69ae9d3","size":1788,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/normalize-newline-3.0.0.tgz_1473165341523_0.8191094812937081"},"directories":{},"publish_time":1473165343571,"_hasShrinkwrap":false,"_cnpm_publish_time":1473165343571,"_cnpmcore_publish_time":"2021-12-16T14:48:24.196Z"},"2.1.0":{"name":"normalize-newline","version":"2.1.0","description":"Normalize the newline characters in a string to `\\n`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/normalize-newline.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":["newline","linebreak","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"1b38a62723feba94015862d006e2fea705ab03ce","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline#readme","_id":"normalize-newline@2.1.0","_shasum":"e2e4f101382abd9569a1f41c1e34f4a0473ea060","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.4.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e2e4f101382abd9569a1f41c1e34f4a0473ea060","size":1776,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/normalize-newline-2.1.0.tgz_1473165079182_0.5205678595229983"},"directories":{},"publish_time":1473165079415,"_hasShrinkwrap":false,"_cnpm_publish_time":1473165079415,"_cnpmcore_publish_time":"2021-12-16T14:48:24.406Z"},"2.0.0":{"name":"normalize-newline","version":"2.0.0","description":"Normalize the newline characters in a string to `\\n`","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/normalize-newline"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["newline","linebreak","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"9690de824c391a90154718377fda80fffacef6e2","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline","_id":"normalize-newline@2.0.0","_shasum":"c88bf6a5471462aceb3f651713bc239b0facb549","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c88bf6a5471462aceb3f651713bc239b0facb549","size":1539,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1450825350133,"_hasShrinkwrap":false,"_cnpm_publish_time":1450825350133,"_cnpmcore_publish_time":"2021-12-16T14:48:24.631Z"},"1.0.2":{"name":"normalize-newline","version":"1.0.2","description":"Normalize the newline characters of a string to `\\n`","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/normalize-newline"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"bin":{"normalize-newline":"cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js","cli.js"],"keywords":["cli","bin","newline","linebreak","line-break","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"dependencies":{"get-stdin":"^4.0.1","minimist":"^1.1.0"},"devDependencies":{"mocha":"*"},"gitHead":"e6120d620499ccbce5fc528de3dc640d20378c5b","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline","_id":"normalize-newline@1.0.2","_shasum":"9a7a7c967629377a4a6ac3b4984f590cca6215a3","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"9a7a7c967629377a4a6ac3b4984f590cca6215a3","size":1935,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-1.0.2.tgz"},"directories":{},"publish_time":1424109484058,"_hasShrinkwrap":false,"_cnpm_publish_time":1424109484058,"_cnpmcore_publish_time":"2021-12-16T14:48:24.850Z"},"1.0.1":{"name":"normalize-newline","version":"1.0.1","description":"Normalize the newline characters of a string to `\\n`","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/normalize-newline"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"bin":{"normalize-newline":"cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js","cli.js"],"keywords":["cli","bin","newline","linebreak","line-break","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"dependencies":{"get-stdin":"^3.0.0","minimist":"^1.1.0"},"devDependencies":{"mocha":"*"},"gitHead":"b8aacaf4399d59cbb54fc2a8a7656d12b1c6d371","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline","_id":"normalize-newline@1.0.1","_shasum":"13808842dc1271c0e10615ef700738433b31b54c","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"13808842dc1271c0e10615ef700738433b31b54c","size":1232,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-1.0.1.tgz"},"directories":{},"publish_time":1408318891504,"_hasShrinkwrap":false,"_cnpm_publish_time":1408318891504,"_cnpmcore_publish_time":"2021-12-16T14:48:25.094Z"},"1.0.0":{"name":"normalize-newline","version":"1.0.0","description":"Normalize the newline characters of a string to `\\n`","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/normalize-newline"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"bin":{"normalize-newline":"cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js","cli.js"],"keywords":["cli","bin","newline","linebreak","line-break","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"dependencies":{"get-stdin":"^2.0.0","minimist":"^1.1.0"},"devDependencies":{"mocha":"*"},"gitHead":"e434dd9b73746f04b75e4efba6f24c3e6c49735d","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline","_id":"normalize-newline@1.0.0","_shasum":"344e2138c910db97a183964e0ad358ca7d687a8b","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"344e2138c910db97a183964e0ad358ca7d687a8b","size":1234,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-1.0.0.tgz"},"directories":{},"publish_time":1408039512065,"_hasShrinkwrap":false,"_cnpm_publish_time":1408039512065,"_cnpmcore_publish_time":"2021-12-16T14:48:25.295Z"},"0.1.0":{"name":"normalize-newline","version":"0.1.0","description":"Normalize the newline characters of a string to `\\n`","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/normalize-newline"},"bin":{"normalize-newline":"cli.js"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js","cli.js"],"keywords":["cli","bin","newline","linebreak","line-break","line","lf","crlf","eol","linefeed","character","char","normalize","convert","replace"],"dependencies":{"get-stdin":"^0.1.0","minimist":"^0.2.0"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"homepage":"https://github.com/sindresorhus/normalize-newline","_id":"normalize-newline@0.1.0","_shasum":"0bb8d96028611eeab981b2920afa0c5037d32c6a","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"0bb8d96028611eeab981b2920afa0c5037d32c6a","size":1218,"noattachment":false,"key":"/normalize-newline/-/normalize-newline-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-newline/download/normalize-newline-0.1.0.tgz"},"directories":{},"publish_time":1403967619047,"_hasShrinkwrap":false,"_cnpm_publish_time":1403967619047,"_cnpmcore_publish_time":"2021-12-16T14:48:25.496Z"}},"readme":"# normalize-newline\n\n> Normalize the [newline](https://en.wikipedia.org/wiki/Newline) characters in a string to `\\n`\n\n## Install\n\n```\n$ npm install normalize-newline\n```\n\n## Usage\n\n```js\nimport normalizeNewline from 'normalize-newline';\n\nnormalizeNewline('foo\\r\\nbar\\nbaz');\n//=> 'foo\\nbar\\nbaz'\n\nnormalizeNewline(Buffer.from('foo\\r\\nbar\\nbaz')).toString();\n//=> 'foo\\nbar\\nbaz'\n```\n\n## API\n\n### normalizeNewline(input)\n\n#### input\n\nType: `string | Buffer`\n\nInput to normalize.\n\n## Related\n\n- [normalize-newline-cli](https://github.com/sindresorhus/normalize-newline-cli) - CLI for this module\n","_attachments":{},"homepage":"https://github.com/sindresorhus/normalize-newline#readme","bugs":{"url":"https://github.com/sindresorhus/normalize-newline/issues"},"license":"MIT"}