CityBEM-CityLayers-SaeedRay.../node_modules/trim-repeated
2024-11-05 15:01:14 -05:00
..
node_modules/escape-string-regexp This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
index.js This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
license This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
package.json This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
readme.md This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05: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