This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/trim-repeated
cranberry ed23347e56 Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
..
index.js Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
license Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
package.json Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
readme.md Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00

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.

License

MIT © Sindre Sorhus