mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
Some packages have vulnerabilities, which can be fixed with "npm audit fix". Unfortunately not all packages can be fixed, as they are transitive dependencies that require major breaking change updates from other packages. Luckily we are not affected by these vulnerabilities in our frontend code. R=aerotwist@chromium.org Bug: none Change-Id: I728411390ebbcb5240045aae5b67b4d8cfc540fb Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2949048 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
trim-newlines 
Trim newlines from the start and/or end of a string
Install
$ npm install trim-newlines
Usage
const trimNewlines = require('trim-newlines');
trimNewlines('\n🦄\r\n');
//=> '🦄'
trimNewlines.start('\n🦄\r\n');
//=> '🦄\r\n'
trimNewlines.end('\n🦄\r\n');
//=> '\n🦄'
API
trimNewlines(string)
Trim from the start and end of a string.
trimNewlines.start(string)
Trim from the start of a string.
trimNewlines.end(string)
Trim from the end of a string.
Related
- trim-left - Similar to
String#trim()but removes only whitespace on the left - trim-right - Similar to
String#trim()but removes only whitespace on the right.
License
MIT © Sindre Sorhus