{"_id":"@cjs-mifi-test/strip-final-newline","_rev":"1-b5b2b58ad3366e7421b7b14148a3b1f2","name":"@cjs-mifi-test/strip-final-newline","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@cjs-mifi-test/strip-final-newline","version":"3.0.0","description":"CJS version: Strip the final newline character from a string/buffer","keywords":["strip","trim","remove","delete","final","last","end","file","newline","linebreak","character","string","buffer"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"main":"./index.js","scripts":{},"engines":{"node":">=12"},"devDependencies":{"ava":"^3.15.0","xo":"^0.39.1"},"_id":"@cjs-mifi-test/strip-final-newline@3.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-O0J0Fm440LvTQFA6+iTCKR6bNxgQM4eB9T3R7s+8Bg2C1eTURU+8YA5R3tJ7sG6kSBii2+XCyLNiuZSgIq8KwQ==","shasum":"c626dca1bc8275df9191dd3920be0f097f6aeb50","tarball":"https://registry.npmjs.org/@cjs-mifi-test/strip-final-newline/-/strip-final-newline-3.0.0.tgz","fileCount":4,"unpackedSize":3404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7lRACRA9TVsSAnZWagAAtR8QAJUtyJ/EEO7McEIplxRo\nyRP5cfFhAlbeUaBwWzUkfTJjrycJ/v5E3WNUqKg+d/QHKhvBkBMSp51Y2txA\neAsckugpHXQg+Y/Au8O2wT8m7VONJkinD7Jyg6Jt3Az0kwSaLPcNCUFQVvYj\n5kluEHnjqEssqyX0pE2W9/26oBD8KEsDgOaJYXfgzSyMM7dQqGbEo/uNdYs3\nXWCEm6Z9NG3zc4C2NeGJELEjVH/I1Ld0bTOrHHWGChR+wFSTrTxV7nBIwojc\n3DtNQTopKS70tuFoZurDlyxsVtubXKh99TnNhN/UUCD91zOZeNRJDtMDLweE\n/aJLaM6yC5Mz8TG+z+KTQQmU+f9baPRE+XzfNv4fQOGEztBTeBKUYHaOAalh\n0obE3zQZ6sDiK49F7iOHcC3Wp1n1sq+2V8hY3qwcYV9nDiuYBasmGdAUjt4w\nRwYrNu68KTRQ8DCVZzkuBSUTwR0xlMqSBqi4fsgnFk0nekW3csMHB+xCpVZg\nSUKhHU1blXo1JVfxjXGXMxyyu5DHYzCXg0jswNufI5yVnfwsRaIiBVuRWI6O\nuQJI8M8zqYGw0vK2/eQtt/9BRDXiVKaSv7V6itAlLJqq/eaiwAwlQXzGGDmc\nc45Um7L8X7wzLuLumsePOGmh8B6YNHiNM/4JYoXrgjzAicZLNQLekGQtLtGw\nvkQI\r\n=oM0w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf1LGCbZzYh3yohRttjRR+Ve6QbotIJRwwxUOb7efPQwIhAO5JL9Wx+OghTSwvxpfWAqCDdHPhVzHegxe3xHL4nrmm"}]},"_npmUser":{"name":"mifi","email":"finstaden@gmail.com"},"directories":{},"maintainers":[{"name":"mifi","email":"finstaden@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/strip-final-newline_3.0.0_1643009088622_0.020295855108407812"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-24T07:24:48.486Z","3.0.0":"2022-01-24T07:24:48.758Z","modified":"2022-04-04T23:09:36.736Z"},"maintainers":[{"name":"mifi","email":"finstaden@gmail.com"}],"description":"CJS version: Strip the final newline character from a string/buffer","keywords":["strip","trim","remove","delete","final","last","end","file","newline","linebreak","character","string","buffer"],"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"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"}