{"_id":"@cjser/trim-newlines__v4_1_1","name":"@cjser/trim-newlines__v4_1_1","dist-tags":{"latest":"4.1.1-cjser.2"},"versions":{"4.1.1-cjser.2":{"name":"@cjser/trim-newlines__v4_1_1","version":"4.1.1-cjser.2","description":"Trim newlines from the start and/or end of a string","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"require":"./dist-cjser/index.cjs","default":"./index.js"},"engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["trim","newline","newlines","linebreak","lf","crlf","left","right","start","end","string","remove","delete","strip"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"4.1.1","cjserVersion":2,"original":{"name":"trim-newlines","version":"4.1.1","exports":"./index.js","repository":"sindresorhus/trim-newlines","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsd"}}},"_id":"@cjser/trim-newlines__v4_1_1@4.1.1-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-OHSbIQIXrmWetOSzJdxL7TBamyEJwFZOP2vtKv7zfX2btu1QGOhgge93l4IbZ4loGJSrCCtp0dQDt9qSjrhk6A==","shasum":"edbc1d002008d9a01210e67d8d6c77681a47ae4b","tarball":"https://registry.npmjs.org/@cjser/trim-newlines__v4_1_1/-/trim-newlines__v4_1_1-4.1.1-cjser.2.tgz","fileCount":6,"unpackedSize":7382,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD5n0bJi78VfQmQcPPPqpGh2SOZpNFv77TrRLwazCxSWwIgP1D9S2f8Yt1C1ee8fWstsdhsGb0SnbfVv6S4k8MDCsY="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trim-newlines__v4_1_1_4.1.1-cjser.2_1778160450344_0.07557794657054773"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T13:27:30.275Z","4.1.1-cjser.2":"2026-05-07T13:27:30.487Z","modified":"2026-05-07T13:27:30.742Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Trim newlines from the start and/or end of a string","keywords":["trim","newline","newlines","linebreak","lf","crlf","left","right","start","end","string","remove","delete","strip"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# trim-newlines\n\n> Trim [newlines](https://en.wikipedia.org/wiki/Newline) from the start and/or end of a string\n\n## Install\n\n```\n$ npm install trim-newlines\n```\n\n## Usage\n\n```js\nimport trimNewlines from 'trim-newlines';\n\ntrimNewlines('\\n🦄\\r\\n');\n//=> '🦄'\n\ntrimNewlines.start('\\n🦄\\r\\n');\n//=> '🦄\\r\\n'\n\ntrimNewlines.end('\\n🦄\\r\\n');\n//=> '\\n🦄'\n```\n\n## API\n\n### trimNewlines(string)\n\nTrim from the start and end of a string.\n\n### trimNewlines.start(string)\n\nTrim from the start of a string.\n\n### trimNewlines.end(string)\n\nTrim from the end of a string.\n\n## Related\n\n- [trim-left](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left\n- [trim-right](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right.\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-trim-newlines?utm_source=npm-trim-newlines&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\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/trim-newlines\n","readmeFilename":"readme.md","_rev":"1-dbcb3eb82d25a24b055da08603ad07d7"}