{"name":"trim-trailing-lines","version":"2.1.0","description":"Remove final line feeds 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"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.52.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"ae571d2f802336f332e0250f30e0c00d105c8395","homepage":"https://github.com/wooorm/trim-trailing-lines#readme","_id":"trim-trailing-lines@2.1.0","_nodeVersion":"19.0.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-5UR5Biq4VlVOtzqkm2AZlgvSlDJtME46uV0br0gENbwN4l5+mMKT4b9gJKqWtuL2zAIqajGJGuvbCbcAJUZqBg==","shasum":"9aac7e89b09cb35badf663de7133c6de164f86df","tarball":"http://registry-npm.ywwl.com/trim-trailing-lines/download/trim-trailing-lines-2.1.0.tgz","fileCount":5,"unpackedSize":6679,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOkauSTdq7vOTf9KnipAOiDIrksaB13LorKfJnZ61iOgIgRxKji7YgFOSmlXMjKdIfyhLAJQ8EdMpDd2XxUXPLlXQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcguFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrB5BAAmDzzqgErlWAohynRhh1GyNQ7bYqPO5uq5tynBPl7axIJOsvD\r\nLggnECWoIDT8gZGJ0J0oW2WbcFALiTJCYa1IkZudtDTlwYTC9eiUjlLIWIA0\r\n2I+nWqBSdyFmr0CMNS4HLKCW/SsbUhlXMS+xrCh+wf8PDGGnnI1mXXhUZiq3\r\nZqx/31q4gzNuVH6iClvdh1BLCnHjCl2VxEKaFsL2FhHs9CIKwbnG0j8Q5gWa\r\nQvp7JFrnXgfAJoHeL+o7Ln7DWy0XQ5ew2/BEfs9mUu/yrh7gUfKUT38NUTfm\r\nHVIGEb5wmaD/sQvEXuUXXmHNuc2tsQWQhhlnfE08D9ybAGjRiuOkg5JQcQYf\r\nBnNyUYUJJzR3LFHVnnLVcdnRb5xK0ynWXgOMeRyFsc52WbaMk0IPf8dQ9A2k\r\naYrGj7AtpXDYKf3msg5Sgmm9g6KlkJu+0fNQ6hwGs0cBs6ki1BbIl5CjTUQg\r\npiM02Xe3ndjo7k2oeSb8/kwK5RiK+RqiS83PU9GAqr+fOk2PUk7CuoBU+nmQ\r\n9pjF9ZX3R9nw0l8ZvGZQM+0s92tpu2XvdrqhQzxqmSmn9/EaAJvEdURGi4rU\r\n2so+/CJQnd5d6dg89bYIv/BuY1iMaI1ITGl85fIIs+VdEcop8SDkbIv1Aqwu\r\nznT/6jtf3VdiqSH/+BUYhOFbbMCgQg36IZ4=\r\n=MyB8\r\n-----END PGP SIGNATURE-----\r\n","size":2892,"noattachment":false,"key":"/trim-trailing-lines/-/trim-trailing-lines-2.1.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/trim-trailing-lines_2.1.0_1668418437340_0.19944464105918436"},"_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":1668418437483,"_cnpm_publish_time":1668418437483,"dist-tags":{"latest":"2.1.0"}}