npm.io
1.0.3 • Published 5 years ago

trim-off-newlines

Licence
MIT
Version
1.0.3
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
8

trim-off-newlines Build Status

Similar to String#trim() but removes only newlines

Install

$ npm install --save trim-off-newlines

Usage

var trimOffNewlines = require('trim-off-newlines');

trimOffNewlines('\n\nunicorns\n\n');
//=> 'unicorns'
  • 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 Steve Mao

Keywords