Files
react-native-devtools-frontend/node_modules/trim-newlines
Tim van der Lippe eab929dec5 Run "npm audit fix"
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>
2021-06-09 14:00:54 +00:00
..
2020-06-11 06:20:04 +00:00
2021-06-09 14:00:54 +00:00
2020-06-11 06:20:04 +00:00
2021-06-09 14:00:54 +00:00
2020-06-11 06:20:04 +00:00

trim-newlines Build Status

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.

  • 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