caoge c760052ff9 机车状态修改 | 8 mēneši atpakaļ | |
---|---|---|
.. | ||
index.js | 8 mēneši atpakaļ | |
license | 8 mēneši atpakaļ | |
package.json | 8 mēneši atpakaļ | |
readme.md | 8 mēneši atpakaļ |
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