system_assignation/node_modules/trim-repeated
2022-03-24 09:22:39 -04:00
..
node_modules/escape-string-regexp add working version of ep_workflow 2022-03-24 09:22:39 -04:00
index.js add working version of ep_workflow 2022-03-24 09:22:39 -04:00
license add working version of ep_workflow 2022-03-24 09:22:39 -04:00
package.json add working version of ep_workflow 2022-03-24 09:22:39 -04:00
readme.md add working version of ep_workflow 2022-03-24 09:22:39 -04:00

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.

License

MIT © Sindre Sorhus