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 toString#trim()but removes only whitespace on the lefttrim-right- Similar toString#trim()but removes only whitespace on the right
MIT © Steve Mao