刘琳琳 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
..
index.js 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
license 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
package.json 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
readme.md 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago

readme.md

trim-repeated Build Status

Trim a consecutively repeated substring: foo--bar---bazfoo-bar-baz

Install

$ npm install --save trim-repeated

Usage

var trimRepeated = require('trim-repeated');

trimRepeated('foo--bar---baz', '-');
//=> 'foo-bar-baz'

trimRepeated('foo@#@#baz', '@#');
//=> 'foo@#baz'

trimRepeated(input, target)

input

Required
Type: string

target

Required
Type: string

Substring to trim.

Related

License

MIT © Sindre Sorhus