trim-off-newlines
Similar to String#trim() but removes only newlines
Last updated 5 years ago by trott .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install trim-off-newlines 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.3                                ...           latest (5 years ago)

5 Versions

  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (2)
Downloads
Total 16
Today 0
This Week 0
This Month 12
Last Day 0
Last Week 11
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE