trim-off-newlines

1.0.3 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    159,933
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    159,933
  • 1.0.2
    1,482
  • 1.0.1
    211,466
  • 1.0.0
    9
  • 0.0.0
    0

Package Sidebar

Install

npm i trim-off-newlines

Weekly Downloads

372,890

Version

1.0.3

License

MIT

Unpacked Size

3.07 kB

Total Files

4

Last publish

Collaborators

  • stevemao
  • trott