{"name":"strip-final-newline","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"strip-final-newline","version":"2.0.0","description":"Strip the final newline character from a string/buffer","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/strip-final-newline.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"devDependencies":{"ava":"^0.25.0","xo":"^0.23.0"},"gitHead":"51c93d6c8683d9fd1cacdb32f2afebac9a1155a1","bugs":{"url":"https://github.com/sindresorhus/strip-final-newline/issues"},"_id":"strip-final-newline@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","dist":{"integrity":"sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==","shasum":"89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad","tarball":"http://localhost:4260/strip-final-newline/strip-final-newline-2.0.0.tgz","fileCount":4,"unpackedSize":3046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb1XUbCRA9TVsSAnZWagAADe4QAIKfZKKn8CFHig0M8lfl\nZWkRAV+2dJAbhILvIrrCYcIZC3A8ICj5GwY5ujeKev8hqkxDe+VfRQRylDTn\nUXCLYMbpV+197qpQb7X6Wdu8ISfIE/zQpBqbGReK/ddJKFHQaIIRG0VWSqWm\nP6R0ICgQPAbMBZ8nYjBjRNvgiseqMwlyxXj1hNKuAR404dGDVIhSzwmg4vku\nmp4FOCDptmFvA/mSzOE/Ochwcdz2wQd6PLtHmCIHzLEvl2z8J4Qaagxwi8yn\neZtQs3B8xtNCKaXOZQYcOMAqZxC4dMGzIEqW3CX9Me9y2p1lHbws55uvNVcX\nHh88Y6/05jr6L6N19ZULpPv9bb5FUcHAOHZFvLhhAl9eQ2WxkZV0IYub5QT7\ngHfcTadB8Mqmw0y58qDwomMLcOXVTwhQYi22OnjTg8pIRq+bfHJzOSgnK7Aa\n464iiikCjO7hG9OfPlpiWdibmFzj8WEsEkzMs6Zeb3uMw6fS8UXTkYLQPzoc\nEtAtOx6PtyKg5Ajl4xlIt4cA24hzsnJs6lJOD89Pd+VIJwihKltOgvOtPN3q\nQ4d2o7S/Ea+e4wIPs6ls4ZWUs5vB7TRQWfrOAeANGxuUSWT+7foTMFBSpOXe\nvxVGokKs1tlzCcbGvew1ZIe+b7RcDbSBr1RwZEo9U41ETveKELS33/Y7oeeL\n2j7u\r\n=W7iG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGUXZVFTxzUEpaEA+kyMDOgCbSmNMZnjYfafIwLWnwN6AiEA+mTwVnuB99UwLZ8AhO9YiC+QgZ5iqZjZEYAk2thqntE="}]},"directories":{},"_hasShrinkwrap":false}},"description":"Strip the final newline character from a string/buffer","homepage":"https://github.com/sindresorhus/strip-final-newline#readme","repository":{"type":"git","url":"git+https://github.com/sindresorhus/strip-final-newline.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/strip-final-newline/issues"},"license":"MIT","readme":"# strip-final-newline\n\n> Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from a string/buffer\n\nCan be useful when parsing the output of, for example, `ChildProcess#execFile`, as [binaries usually output a newline at the end](https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline). Normally, you would use `stdout.trim()`, but that would also remove newlines at the start and whitespace.\n\n## Install\n\n```\n$ npm install strip-final-newline\n```\n\n## Usage\n\n```js\nimport stripFinalNewline from 'strip-final-newline';\n\nstripFinalNewline('foo\\nbar\\n\\n');\n//=> 'foo\\nbar\\n'\n\nstripFinalNewline(Buffer.from('foo\\nbar\\n\\n')).toString();\n//=> 'foo\\nbar\\n'\n```\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-strip-eof?utm_source=npm-strip-eof&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","readmeFilename":"readme.md"}