{"name":"trim-trailing-lines","version":"1.1.1","description":"Remove final newline characters from a string","license":"MIT","keywords":["trim","final","line","newline","characters"],"repository":{"type":"git","url":"git+https://github.com/wooorm/trim-trailing-lines.git"},"bugs":{"url":"https://github.com/wooorm/trim-trailing-lines/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","esmangle":"^1.0.0","nyc":"^11.0.0","prettier":"^1.12.1","remark-cli":"^5.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.6.3","xo":"^0.20.0"},"scripts":{"format":"remark . -qfo && prettier --write '**/*.js' && xo --fix","build-bundle":"browserify index.js -s trimTrailingLines > trim-trailing-lines.js","build-mangle":"esmangle trim-trailing-lines.js > trim-trailing-lines.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"no-var":"off","prefer-arrow-callback":"off"},"ignores":["trim-trailing-lines.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"8e47763b310c189767016cbd0742275c7f676d3d","homepage":"https://github.com/wooorm/trim-trailing-lines#readme","_id":"trim-trailing-lines@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"integrity":"sha512-bWLv9BbWbbd7mlqqs2oQYnLD/U/ZqeJeJwbO0FG2zA1aTq+HTvxfHNKFa/HGCVyJpDiioUYaBhfiT6rgk+l4mg==","shasum":"e0ec0810fd3c3f1730516b45f49083caaf2774d9","tarball":"http://registry-npm.ywwl.com/trim-trailing-lines/download/trim-trailing-lines-1.1.1.tgz","fileCount":4,"unpackedSize":4405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5EmBCRA9TVsSAnZWagAAjDoP/2BA/SZ3iAHb3vSHkUPq\nf+CjOO/6gRaeEX0UFaHh87G047Pi4wPICH1qZbk+DD6d9IgfyOBo5tchV2OG\no4H5TX/O6A7ZTHuJG+xwxEAdJ0EWlD3j9zwA3qcSt75hyXMNrPyXhdNM74sE\nRiS+Hz7LD6+On4M2MxSJze8InW/xxM2veer1eGklvDFIHi2bNfe+r1lpfygd\nD1DDGRnx/dl4EwI9vuPAEasTN2nvB767BiPwANm0gjkFLno/cx0CE8EEu18h\n1UgXvid/Bf7dFVqeKjuc+FZjDHoTMGJbL0SgGZWCnmhbGAcdlqf+41IV3Fvs\nADDS6WDCF5crsmKVWswOi0tTFG0E6c6jHs3i5QKc46uGZSQhWCIlUHUN+JXC\nFWlIMNGtbdAhc7uxlegmmmTPBpD4z9b2ioq11S0BfyxZ/uba6c6oTz7JGreg\nk72KuM2rTeym27hKevJ6br7kXIjSczytK+MFXbsr9Ts9FzU9UjW1HzWbI7Aa\nalEoZg3ohqrWpEkbsychzIz5SdX9LB2/KtRYta5a/wqvKP8CCcOhrYan/5Ro\nKVCJ+v8DiWRjPjEYd0Kzlyn9HLx8lJhfvEpehlBHgDIlJnilaaxWG6fbG7O/\nuw3kaYMUKYg2SvdZffXnyGaPMU6MktIvDt09NpJ4uq24EeV5Bc4k3SViX+Ke\nOwIu\r\n=IKt2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEai+JXWseaIG1woOi+Sgh3kQTSSmFZVbX2Vgde0DTEBAiEA7iWV+pfanGn+fGY+vOOh7syqvnRGNT9l/P2SqQQQ2qs="}],"size":2106,"noattachment":false,"key":"/trim-trailing-lines/-/trim-trailing-lines-1.1.1.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trim-trailing-lines_1.1.1_1524910465031_0.34600409262191945"},"_hasShrinkwrap":false,"readme":"# trim-trailing-lines\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nRemove final line endings from a string.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`trimTrailingLines(value)`](#trimtrailinglinesvalue)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Contribute](#contribute)\n*   [Security](#security)\n*   [License](#license)\n\n## What is this?\n\nThis is a tiny package that removes final line endings (CR, LF, CR+LF) from a\nstring.\n\n## When should I use this?\n\nThis package is rather niche, I found myself repeating this code when working\nwith a lot of markdown.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install trim-trailing-lines\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {trimTrailingLines} from 'https://esm.sh/trim-trailing-lines@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {trimTrailingLines} from 'https://esm.sh/trim-trailing-lines@2?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {trimTrailingLines} from 'trim-trailing-lines'\n\ntrimTrailingLines('foo\\nbar') // => 'foo\\nbar'\ntrimTrailingLines('foo\\nbar\\n') // => 'foo\\nbar'\ntrimTrailingLines('foo\\nbar\\n\\n') // => 'foo\\nbar'\n```\n\n## API\n\nThis package exports the identifier `trimTrailingLines`.\nThere is no default export.\n\n### `trimTrailingLines(value)`\n\nRemove final line endings from `value`.\n\n##### Parameters\n\n###### `valeu`\n\nValue with trailing line endings, coerced to string (`unknown`).\n\n##### Returns\n\nValue without trailing line endings (`string`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## Security\n\nThis package is safe.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/trim-trailing-lines/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/trim-trailing-lines/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg\n\n[coverage]: https://codecov.io/github/wooorm/trim-trailing-lines\n\n[downloads-badge]: https://img.shields.io/npm/dm/trim-trailing-lines.svg\n\n[downloads]: https://www.npmjs.com/package/trim-trailing-lines\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/trim-trailing-lines.svg\n\n[size]: https://bundlephobia.com/result?p=trim-trailing-lines\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[license]: license\n\n[author]: https://wooorm.com\n","publish_time":1524910465110,"_cnpm_publish_time":1524910465110,"dist-tags":{"latest":"2.1.0"}}