Similar to
String#trim()
but removes only newlines
$ npm install --save trim-off-newlines
var trimOffNewlines = require('trim-off-newlines');
trimOffNewlines('\n\nunicorns\n\n');
//=> 'unicorns'
trim-left
- Similar to String#trim()
but removes only whitespace on the lefttrim-right
- Similar to String#trim()
but removes only whitespace on the rightMIT © Steve Mao