Bachir Soussi Chiadmi ac58a24f5c added bower, gulp | 7 سال پیش | |
---|---|---|
.. | ||
index.js | 7 سال پیش | |
license | 7 سال پیش | |
package.json | 7 سال پیش | |
readme.md | 7 سال پیش |
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