Bakhtina Sofya b84cb877be 1st comm | 2 週間 前 | |
---|---|---|
.. | ||
node_modules | 2 週間 前 | |
index.js | 2 週間 前 | |
license | 2 週間 前 | |
package.json | 2 週間 前 | |
readme.md | 2 週間 前 |
Trim a consecutively repeated substring:
foo--bar---baz
→foo-bar-baz
$ npm install --save trim-repeated
var trimRepeated = require('trim-repeated');
trimRepeated('foo--bar---baz', '-');
//=> 'foo-bar-baz'
trimRepeated('foo@#@#baz', '@#');
//=> 'foo@#baz'
Required
Type: string
Required
Type: string
Substring to trim.
condense-whitespace
- Remove leading, trailing and repeated whitespace from a stringMIT © Sindre Sorhus