{"name":"eol","description":"Newline character converter","version":"0.7.0","homepage":"https://github.com/ryanve/eol","license":"MIT","author":{"name":"Ryan Van Etten"},"keywords":["eol","newline","newlines","convert","converter","conversion","character","formatting","format","string","javascript","typescript","file","ender"],"main":"eol.js","types":"eol.d.ts","typings":"eol.d.ts","scripts":{"lint":"jshint eol.js && jshint test.js","pretest":"npm run lint","test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/ryanve/eol.git"},"bugs":{"url":"https://github.com/ryanve/eol/issues"},"devDependencies":{"aok":"^1.9.0","jshint":"^2.9.3"},"jshintConfig":{"asi":true,"boss":true,"browser":true,"eqnull":true,"expr":true,"latedef":"nofunc","laxcomma":true,"maxerr":5,"node":true,"sub":true,"supernew":true,"undef":true,"unused":true},"gitHead":"9950b994bfcbc9c397c5e0351ad4bd4c72f23b9d","_id":"eol@0.7.0","_shasum":"51c39cb0804acd1db64550e84a076042da786b56","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"ryanve","email":"ryanve@gmail.com"},"dist":{"shasum":"51c39cb0804acd1db64550e84a076042da786b56","tarball":"http://registry-npm.ywwl.com/eol/download/eol-0.7.0.tgz","integrity":"sha512-4xLgHUohEmnM6J2vEjVcs3zRSnBr9H1AsD7gwM43NwijrIUOAJIuvpfg5fp7r2IMfQ3xrnNOZTBtn/DNqmIhIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYWJORTpPOHXhzwsJZdI8Gmzqx5RqZEYyMKsoQUmzl/gIgZAUjk3Me0+h7GmmfMDsNGNSAhsNP7vyNBPMoYXGqTXY="}],"size":4304,"noattachment":false,"key":"/eol/-/eol-0.7.0.tgz"},"maintainers":[{"name":"ryanve","email":"ryanve@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/eol-0.7.0.tgz_1487406712632_0.930875880876556"},"directories":{},"readme":"# eol\r\n[Newline](http://en.wikipedia.org/wiki/Newline) character converter for JavaScript. Available [on npm](https://www.npmjs.com/package/eol).\r\n\r\n```\r\nnpm install eol --save\r\n```\r\n\r\n### `require` or `import`\r\n\r\n```js\r\nconst eol = require('eol')\r\n```\r\n\r\n```js\r\nimport eol from 'eol'\r\n```\r\n\r\n## API\r\n\r\n### `eol.auto(text)`\r\n- Normalize line endings in <var>text</var> for the current operating system\r\n- <b>@return</b> string with line endings normalized to `\\r\\n` or `\\n`\r\n\r\n### `eol.crlf(text)`\r\n- Normalize line endings in <var>text</var> to <b>CRLF</b> (Windows, DOS)\r\n- <b>@return</b> string with line endings normalized to `\\r\\n`\r\n\r\n### `eol.lf(text)`\r\n- Normalize line endings in <var>text</var> to <b>LF</b> (Unix, OS X)\r\n- <b>@return</b> string with line endings normalized to `\\n`\r\n\r\n### `eol.cr(text)`\r\n- Normalize line endings in <var>text</var> to <b>CR</b> (Mac OS)\r\n- <b>@return</b> string with line endings normalized to `\\r`\r\n\r\n### `eol.before(text)`\r\n- Add linebreak before <var>text</var>\r\n- <b>@return</b> string with linebreak added before text\r\n\r\n### `eol.after(text)`\r\n- Add linebreak after <var>text</var>\r\n- <b>@return</b> string with linebreak added after text\r\n\r\n### `eol.split(text)`\r\n- Split <var>text</var> by newline\r\n- <b>@return</b> array of lines\r\n\r\n### Joining\r\n\r\nCoercing `eol.auto`|`eol.crlf`|`eol.lf`|`eol.cr` to string yields the appropriate character. This is useful for joining.\r\n\r\n```js\r\nString(eol.lf) // \"\\n\"\r\neol.split(text).join(eol.auto) // same as eol.auto(text)\r\neol.split(text).filter(line => line).join(eol.auto) // text joined after removing empty lines\r\neol.split(text).slice(-3).join(eol.auto) // last 3 lines joined\r\n```\r\n\r\n## License\r\nMIT\r\n","publish_time":1487406714341,"_cnpm_publish_time":1487406714341,"dist-tags":{"latest":"0.10.0"}}