Bakhtina Sofya b84cb877be 1st comm 3 nedēļas atpakaļ
..
node_modules b84cb877be 1st comm 3 nedēļas atpakaļ
index.js b84cb877be 1st comm 3 nedēļas atpakaļ
license b84cb877be 1st comm 3 nedēļas atpakaļ
package.json b84cb877be 1st comm 3 nedēļas atpakaļ
readme.md b84cb877be 1st comm 3 nedēļas atpakaļ

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