{"name":"trim-trailing-lines","version":"1.0.0","description":"Remove final newline characters from a string","license":"MIT","keywords":["trim","final","line","newline","characters"],"files":["index.js","LICENSE"],"repository":{"type":"git","url":"git+https://github.com/wooorm/trim-trailing-lines.git"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com"},"devDependencies":{"browserify":"^10.0.0","eslint":"^0.24.0","esmangle":"^1.0.0","istanbul":"^0.3.0","jscs":"^1.0.0","jscs-jsdoc":"^1.0.0","mdast":"^0.26.0","mdast-github":"^0.3.1","mdast-lint":"^0.4.1","mdast-yaml-config":"^0.2.0","mocha":"^2.0.0"},"scripts":{"test-api":"mocha --check-leaks test.js","test-coveralls":"istanbul cover _mocha --report lcovonly -- --check-leaks test.js","test-coverage":"istanbul cover _mocha -- --check-leaks test.js","test-travis":"npm run test-coveralls","test":"npm run test-api","lint-api":"eslint .","lint-style":"jscs --reporter inline .","lint":"npm run lint-api && npm run lint-style","make":"npm run lint && npm run test-coverage","build-md":"mdast . LICENSE --output --quiet","build-bundle":"browserify index.js --bare -s trimTrailingLines > trim-trailing-lines.js","postbuild-bundle":"esmangle trim-trailing-lines.js > trim-trailing-lines.min.js","build":"npm run build-md && npm run build-bundle"},"gitHead":"f9104a9d88462fab698e9d1e353a23d0da6103bf","bugs":{"url":"https://github.com/wooorm/trim-trailing-lines/issues"},"homepage":"https://github.com/wooorm/trim-trailing-lines#readme","_id":"trim-trailing-lines@1.0.0","_shasum":"dbb638247a2232f669121c458fccd48fc2670c8e","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.3","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"dbb638247a2232f669121c458fccd48fc2670c8e","tarball":"http://registry-npm.ywwl.com/trim-trailing-lines/download/trim-trailing-lines-1.0.0.tgz","integrity":"sha512-ZgZYUn+5KZLwM9d2/mMVTn1Kr7Qg1RkpugPvUd/pCwulZUMY898/xEvP45uYHL5uWFN4hqtTUT5/uUgri5Piuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQr9e/1aWxF03687xlCH6EJJz/Ea6mJ1pkE/RYrGmwLQIgZceDqDAMYJrnKv6P1YWfSEaLK4bYefHgYBP3IQ8pREA="}],"size":2278,"noattachment":false,"key":"/trim-trailing-lines/-/trim-trailing-lines-1.0.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"directories":{},"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":1436718327097,"_cnpm_publish_time":1436718327097,"dist-tags":{"latest":"2.1.0"}}