Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

trim-off-newlines

stevemao5.4mMIT1.0.3

Similar to String#trim() but removes only newlines

trim, newlines, new-lines, newline, new-lines, string, str, util, utils, utility, whitespace, space, remove, delete

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'
  • 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