{"_id":"@cjser/trim-newlines","name":"@cjser/trim-newlines","dist-tags":{"latest":"5.0.0-cjser.2"},"versions":{"5.0.0-cjser.2":{"name":"@cjser/trim-newlines","version":"5.0.0-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":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["trim","newline","newlines","linebreak","lf","crlf","left","right","start","end","string","remove","delete","strip"],"devDependencies":{"ava":"^5.2.0","tsd":"^0.28.0","xo":"^0.53.1"},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"5.0.0","cjserVersion":2,"original":{"name":"trim-newlines","version":"5.0.0","exports":"./index.js","repository":"sindresorhus/trim-newlines","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsd"}}},"_id":"@cjser/trim-newlines@5.0.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-+lM37XT2aR/F90qwMkalXECPUQRWBVcVoGoR7NFArcN4bOc+8F3tlZZY4uEaoMbPlBvBNFdyfdfpruaVCkvzOA==","shasum":"c94449f9be8d5598da56b8b5ad38074864243fc2","tarball":"https://registry.npmjs.org/@cjser/trim-newlines/-/trim-newlines-5.0.0-cjser.2.tgz","fileCount":6,"unpackedSize":7573,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqiy5aAEmMhBdp+iD07gpre+YrLmXahbWyMCnZ5CtzdAIhAMzCfU4lNwMgNFNsbfGxQ129s3PcscuQzurb9Hb78SVH"}]},"_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_5.0.0-cjser.2_1778160445528_0.7547376310873255"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T13:27:25.423Z","5.0.0-cjser.2":"2026-05-07T13:27:25.703Z","modified":"2026-05-07T13:27:25.941Z"},"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\nLooking to trim all whitespace, not just newlines? Use `String#trim()`, `String#trimStart()`, or `String#trimEnd()`.\n\n## Install\n\n```sh\nnpm install trim-newlines\n```\n\n## Usage\n\n```js\nimport {trimNewlines, trimNewlinesStart, trimNewlinesEnd} from 'trim-newlines';\n\ntrimNewlines('\\n🦄\\n🦄\\r\\n');\n//=> '🦄\\n🦄'\n\ntrimNewlinesStart('\\n🦄\\r\\n');\n//=> '🦄\\r\\n'\n\ntrimNewlinesEnd('\\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### trimNewlinesStart(string)\n\nTrim from the start of a string.\n\n### trimNewlinesEnd(string)\n\nTrim from the end of a string.\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-9779cf017000c76eab9f02fc331615c6"}