trim-off-newlines

Similar to String#trim() but removes only newlines

MIT 5 个版本
安装
npm install trim-off-newlines
yarn add trim-off-newlines
pnpm add trim-off-newlines
bun add trim-off-newlines
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

版本列表
1.0.3 2021-10-24
1.0.2 2021-09-17
1.0.1 2016-07-18
1.0.0 2015-09-18
0.0.0 2015-09-18