Tennessee Gibbs 0304752480 added pages to master | 6 年之前 | |
---|---|---|
.. | ||
index.js | 6 年之前 | |
license | 6 年之前 | |
package.json | 6 年之前 | |
readme.md | 6 年之前 |
Trim newlines from the start and/or end of a string
$ npm install --save trim-newlines
var trimNewlines = require('trim-newlines');
trimNewlines('\nunicorn\r\n');
//=> 'unicorn'
Trim from the start and end of a string.
Trim from the start of a string.
Trim from the end of a string.
String#trim()
but removes only whitespace on the leftString#trim()
but removes only whitespace on the right.MIT © Sindre Sorhus