{"_id":"detect-eol","_rev":"6-f71294eadb2919cdd551f8c804d27cc7","name":"detect-eol","dist-tags":{"latest":"3.0.2"},"versions":{"1.0.0":{"name":"detect-eol","version":"1.0.0","keywords":["detect","eol","newline","nl","fast","quick"],"author":{"name":"Fabio Spampinato","email":"spampinabio@gmail.com"},"license":"MIT","_id":"detect-eol@1.0.0","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/detect-eol#readme","bugs":{"url":"https://github.com/fabiospampinato/detect-eol/issues"},"ava":{"files":["test/index.js"]},"dist":{"shasum":"d34779552cd6a61ba055772116f7ede580ce0987","tarball":"https://registry.npmjs.org/detect-eol/-/detect-eol-1.0.0.tgz","fileCount":10,"integrity":"sha512-eDMbFjRhcz79EmgcFt0h6Uz5/sYQwX6iWcy1EhLPTklZXljG1g9LpiEn01jmlOTmz6tiwbjSe34kCq6CJreIow==","signatures":[{"sig":"MEUCIQCP/uh2FmoWSfLdo5viH3g2YmaoVAJU5ZWMZEKtpZjJ0wIge6VseQbIVZIz/ZLtYRY7GZf5v18XVsiN+DyHfv36Vwc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMbgeCRA9TVsSAnZWagAA26UP/Rb/MAq38ibfNEzQdbIN\nijIwzcGAUxXsYCHyKvEco4obJDivjMuM/QRHE8szv2KOXgiPoWg4kFgUFbaK\nsoqMQGn8RmWuXxs9Sm3ibA7kyUnuRINQHRDKjccr2TyuTzCw+gDeHVC76CaM\nr1EjxVFOJCpbG/Ff7MdfrkiQre+SJmQ9WJNxz1xBCJbY2y8FaTuuQE9A8ghB\nAUN5EOpyWCeO0qsnDNf9G5bD05j1jmS2yPrQi5gn3xliCbomcOIp5Dbw7dnc\n+J5SsClVwjkuyBrh46ZBJ7kpaAvmhnUsk8+H67FBqLoHl2zglT+wUJYjWzjU\nEQgVztfKyVMQG1StxYAlmxmOVi3BMrNaFddRkdGEHJEhOEfyK+mO2gPrsKIw\njJWr8bRkTvMdtZvB45019pkKKfPb4boOdLKPWAB3P8kucmOYOkJ/Pv1FP54D\njqEVUgNGlNjXrxC3rrzMNaCsruewwlPXYJ/U0c6hxQIYY7SGMB1rb+fu81LK\nY7RtJzvMktaJbD/L9jwaTviKUCYzIcG/Sc59oGYVGcI7fQHeD1JST8ka7T+S\npSzxK6zPGmxLBRDTJPxDeuXpYnYLE6vWs1O1bq+4O76DTcmcPC3kcZvQu/OA\n2ng4eYL6Yshm74EYwIvCm1NgEFV5T6R6c+vKs8yZsRFv6qLSGtSQozPKVH5W\nivGq\r\n=1HSH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c268ed3b62afa9e9351f8d0d18c37d370c6ae9da","scripts":{"test":"ava","clean":"npm run clean:dist && npm run clean:coverage","report":"nyc report","compile":"tsc --skipLibCheck && tstei","coverage":"nyc --reporter=html ava","benchmark":"node tasks/benchmark.js","clean:dist":"rimraf dist","test:watch":"ava --watch","report:html":"open coverage/index.html","compile:watch":"tsc --skipLibCheck --watch","clean:coverage":"rimraf coverage .nyc_output","prepublishOnly":"npm run clean && npm run compile && npm run coverage"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/detect-eol.git","type":"git"},"_npmVersion":"6.4.1","description":"Quickly detect the EOL used in a string.","directories":{},"_nodeVersion":"8.4.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"ava":"^2.3.0","nyc":"^15.0.0","rimraf":"^3.0.1","ava-spec":"^1.1.1","benchloop":"^1.3.1","typescript":"^3.7.5","@types/node":"^13.5.1","detect-newline":"^3.1.0","typescript-transform-export-interop":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/detect-eol_1.0.0_1580316702563_0.6501294093123386","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"detect-eol","version":"2.0.0","keywords":["detect","eol","newline","nl","fast","quick"],"_id":"detect-eol@2.0.0","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/detect-eol#readme","bugs":{"url":"https://github.com/fabiospampinato/detect-eol/issues"},"dist":{"shasum":"e50dffd1f926fb54ef3287dce6a7f869d0b9625a","tarball":"https://registry.npmjs.org/detect-eol/-/detect-eol-2.0.0.tgz","fileCount":10,"integrity":"sha512-Baxc1AvOPhXZbXT5u6n+2fd1tV0axFFruQQOjIalaOJUFxqhFWQ5QJOYFptPWEflH8notDg/LxNdZTHlQTQ5xg==","signatures":[{"sig":"MEQCIFLLt7mLWBCB1eLS1vvthISfum3E1ao0xvGRHLWrGbmkAiAt+ZKGT84LP1U5XVQdiyM2oOMN/Eq6C0xkaT6gEW8Pxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTctuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcbA/9G3s/uf0YSsbbY/vPLiOl0SuIsfQ9fWPhtnaw/Qs+iK2IEEJW\r\nxgbvoHK87vZvPrKlxoZ/usdUCMyLP/5LbNx3YcUtlvvehlsdsB6MouBA8N+M\r\nIu0aNaC5W5n0+VNaNIbHNBNe1Guo/quIvMXIcjJ5jvYx0uCvqEWcsZbjW9V+\r\nTu6403N0F2SmKZwc8QINyh6xMjvcK5tg49xw6fIkSR04HpO3e5KxKqwlihOD\r\ne+ILBcjhwKxzkakmyVCazydmdY8vXo8Zawi1vA8oXEYYqilGVQT3Kc0SuFin\r\nVYY5XqO1iN+XyRjQKoN59GdgE1eWf5+j+uipe3dVqCTokQLlHL3NfX1zrkWa\r\n7aSJIxPczn44UJr09CmzTJUmjTogd6ntkinWSBpLHFI2n/Gkg7T8I4660/mf\r\nr4xNFFqd+zKE18T+JCrDQ0zRX6cwsPk8ZqmN9vSJl0ci5RhkZrWNdNOYSnco\r\nGHHk8W/0iVVfi8XzQgykqyc0SVlAFrxyprBj7m4GX2A4AuOLATC8qYtZK00k\r\nHgyCRP/38gHMVeJjDV+Net8+OTeoTER0zZrpbP/IbeV0kSVSRYHU3YKcaXfu\r\nq9ub69EaaMWespCxvwCCMQz+jJfK7xv6CYx4qmfy081PKVfNUOZoQCcal1j0\r\ngxhPD9Z+PuTFGIFJQizicbymt6MTGCJGUVg=\r\n=ci1k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"ea0632a4eeeca0774bf53c46d7cc3a4a18401ad0","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","benchmark":"tsex benchmark","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"npm run clean && npm run compile && npm run test","benchmark:watch":"tsex benchmark --watch"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/detect-eol.git","type":"git"},"_npmVersion":"8.1.0","description":"Quickly detect the EOL used in a string.","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.0.6","tsex":"^1.0.5","benchloop":"^1.3.2","typescript":"^4.6.3","detect-newline":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/detect-eol_2.0.0_1649265518106_0.6826642660750155","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"detect-eol","version":"3.0.0","keywords":["detect","eol","newline","nl","fast","quick"],"_id":"detect-eol@3.0.0","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/detect-eol#readme","bugs":{"url":"https://github.com/fabiospampinato/detect-eol/issues"},"dist":{"shasum":"452ef94bb84d7fbd05e6c52642809fcc77d05b30","tarball":"https://registry.npmjs.org/detect-eol/-/detect-eol-3.0.0.tgz","fileCount":16,"integrity":"sha512-cq+o48iA536id2HSVGCyaukuS8k+3Nrq/tDr3xObZXYNjiMNF3vH+d1RxU7aAC4zH6YLC/siC3JrlwYT7pU+QQ==","signatures":[{"sig":"MEYCIQDJa04SiYuJxgGR1/gB9Mr5HZLjTmKu0CYDKh9TaqFkmgIhAPLhONzzCn+jEOACFxw3u+0m1yutIcN0EAWgXk/EeLZQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7otrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDWg//a44kVmR3MFGuDYJCeknltHM5u5C34ej1hcWULvv3ML5UDkiz\r\nooFKnyj8NB9Dkkc48hlxWW7/Jce1T7dQzznohHL/6ZlMINCvGXQ8Q18QuIDP\r\n/4jRwqAfqQVcdLeWrctguWDNPFu/wRO508Jh/I50cr8HG3cLoDZv/G5ykeOf\r\nbK0lOvC8vG5IcNKb38f+ZcTkbyLU6igcWwdeLJ5VXa5wK5FWk0rEdUpRWNzc\r\nePprE9xIru1LdbpEt/6l/l9V9kFa2WpT8/Qj4zBCBs5UnzJ/dWjfctNqhwvc\r\nyBbYZdqinweuhBArZ/vCEjphN3Xc64k4A+nEtaRMLohnjtTlDeQOAnCYKNuz\r\nweVnBfumK9VxDvJvZpTaUDUfwuq3PNgCjEfXAjzHjk1HemtbVVM/YZbMRbYg\r\nNQiv4Zm8iY93yWfqrRJIuIeVhhURYSfGOwcGdabA4MbeKuIXCN/G6z0nA/fi\r\nnGaJEAG+s3F69jvk0RYJoyN9HNDKHRLWseSgWCUWRdUfYrn4YLQUujgnwwDG\r\nBNilTtUSqQY9C54+TUh2biZgXG8IxR8SJt4LAFccwiaK3a7oqYen+msF8d8T\r\nppMkCufLYGlFuBWNaQLnxYf1f1AJzMwkaxAgROt171GtjYhSDK5gv5umgmzf\r\n5czGZyHRPt6xyy2Hn+ZrjT5wJTZg/kkcs7Q=\r\n=7yTa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"e9268e42f5c15ceacbda36781ccfc87cf1df5d3e","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","benchmark":"tsex benchmark","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare","benchmark:watch":"tsex benchmark --watch"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/detect-eol.git","type":"git"},"_npmVersion":"8.19.2","description":"Quickly detect the EOL used in a string.","directories":{},"_nodeVersion":"18.12.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.2.0","tsex":"^2.2.0","benchloop":"^2.0.0","typescript":"^4.9.5"},"_npmOperationalInternal":{"tmp":"tmp/detect-eol_3.0.0_1676577643326_0.5503162917808171","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"detect-eol","version":"3.0.1","keywords":["detect","eol","newline","nl","fast","quick"],"_id":"detect-eol@3.0.1","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/detect-eol#readme","bugs":{"url":"https://github.com/fabiospampinato/detect-eol/issues"},"dist":{"shasum":"65b0d5fcf71171c90cedcbc3601672baeef5592a","tarball":"https://registry.npmjs.org/detect-eol/-/detect-eol-3.0.1.tgz","fileCount":16,"integrity":"sha512-ncnuLiZCKO7Kt+3CpwUIV8QnnwpBsSFxGQBY6Nve18K2aOrTim2xpzDa8YunHkePt39OCfV2qOX+b7xjYSDRWg==","signatures":[{"sig":"MEYCIQDQ6rZ1lu+Pvd7Z+VXLLsUCZQp+jSjUHoj3Ag8f0js/dgIhAJK7B+32QMT/oStK5fhKUQEXfGWiRBD7DFCLTzAlcZuB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8372},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"825c942f303bb0aa4d538ea5bbce06e72cd5dd28","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","benchmark":"tsex benchmark","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare","benchmark:watch":"tsex benchmark --watch"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/detect-eol.git","type":"git"},"_npmVersion":"10.2.3","description":"Quickly detect the EOL used in a string.","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.2.1","tsex":"^3.0.1","benchloop":"^2.1.1","typescript":"^5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/detect-eol_3.0.1_1712269897574_0.9206872143356424","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"detect-eol","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/detect-eol.git"},"description":"Quickly detect the EOL used in a string.","license":"MIT","version":"3.0.2","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"benchmark":"tsex benchmark","benchmark:watch":"tsex benchmark --watch","clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["detect","eol","newline","nl","fast","quick"],"devDependencies":{"benchloop":"^2.1.1","fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"detect-eol@3.0.2","gitHead":"3133c0a0f19a36630ed88c6bec91f69945791a4a","bugs":{"url":"https://github.com/fabiospampinato/detect-eol/issues"},"homepage":"https://github.com/fabiospampinato/detect-eol#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-KDW8+mPMJ1BlzUuqEy8RJJpTQ+RxQnlAEsZAox3QN0RdDJizDCp/DWO6oJOELBd15PNfhnBU3ZN6gfCvnDIqHg==","shasum":"271be9de792b395df90ab20cb3d51fc4e58922d8","tarball":"https://registry.npmjs.org/detect-eol/-/detect-eol-3.0.2.tgz","fileCount":9,"unpackedSize":5062,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFbH2l1uT+wmmxbmYJW0Ff9EfZs8i+sUc1FyYMxHnmc8AiBFbR/Y0XUQP/hKF85bPGfhIazkYckNEghLrziI5oT4Og=="}]},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/detect-eol_3.0.2_1783166503058_0.13951966104251357"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-29T16:51:42.562Z","modified":"2026-07-04T12:01:43.299Z","1.0.0":"2020-01-29T16:51:42.703Z","2.0.0":"2022-04-06T17:18:38.315Z","3.0.0":"2023-02-16T20:00:43.579Z","3.0.1":"2024-04-04T22:31:37.784Z","3.0.2":"2026-07-04T12:01:43.197Z"},"bugs":{"url":"https://github.com/fabiospampinato/detect-eol/issues"},"homepage":"https://github.com/fabiospampinato/detect-eol#readme","keywords":["detect","eol","newline","nl","fast","quick"],"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/detect-eol.git"},"description":"Quickly detect the EOL used in a string.","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"readme":"# Detect EOL\n\nQuickly detect the EOL used in a string.\n\n## Features\n\n- This returns the most common type of EOL found in the string within a given window length, or the first EOL found after that, or the fallback EOL.\n- You can set the window length to 0 to just assume consistent EOLs, for maximum performance.\n- You can set the window length to Infinity to scan the entire string, for maximum accuracy.\n\n## Install\n\n```sh\nnpm install detect-eol\n```\n\n## Usage\n\nThe function has the following interface:\n\n```ts\nfunction ( string: string, options: { fallback: string = '\\n', window: number = 1024 } ): string;\n```\n\nYou can use it like this:\n\n```ts\nimport detectEOL from 'detect-eol';\nimport os from 'os';\n\n// Let's detect the EOL used in some strings\n\ndetectEOL ( 'foo\\nbar' ); // => '\\n'\ndetectEOL ( 'foo\\r\\nbar' ); // => '\\r\\n'\ndetectEOL ( 'foo\\rbar' ); // => '\\r'\ndetectEOL ( '' ); // => '\\n'\ndetectEOL ( '', { fallback: os.EOL } ); // => os.EOL\n```\n\n## License\n\nMIT © Fabio Spampinato\n","readmeFilename":"readme.md","license":"MIT"}