trim-off-newlines

Similar to String#trim() but removes only newlines

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
trim-off-newlines
1.0.310 months ago7 years agoMinified + gzip package size for trim-off-newlines in KB

Readme

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'

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 © Steve Mao