btc_horse/btc-UI/electron/node_modules/trim-repeated
2025-07-08 10:33:49 +05:30
..
node_modules/escape-string-regexp Hoese UI needs fixing 2025-07-08 10:33:49 +05:30
index.js Hoese UI needs fixing 2025-07-08 10:33:49 +05:30
license Hoese UI needs fixing 2025-07-08 10:33:49 +05:30
package.json Hoese UI needs fixing 2025-07-08 10:33:49 +05:30
readme.md Hoese UI needs fixing 2025-07-08 10:33:49 +05:30

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