trim-repeated

WebJar for trim-repeated

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

trim-repeated
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

trim-repeated
WebJar for trim-repeated
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/trim-repeated

Download trim-repeated

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/trim-repeated/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>trim-repeated</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/trim-repeated/
implementation 'org.webjars.npm:trim-repeated:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/trim-repeated/
implementation ("org.webjars.npm:trim-repeated:1.0.0")
'org.webjars.npm:trim-repeated:jar:1.0.0'
<dependency org="org.webjars.npm" name="trim-repeated" rev="1.0.0">
  <artifact name="trim-repeated" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='trim-repeated', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "trim-repeated" % "1.0.0"
[org.webjars.npm/trim-repeated "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : escape-string-regexp jar [1.0.2,2)

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.0