clone-regexp

WebJar for clone-regexp

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

clone-regexp
Last Version

Last Version

2.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

clone-regexp
WebJar for clone-regexp
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/clone-regexp

Download clone-regexp

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : is-regexp jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

clone-regexp Build Status

Clone and modify a RegExp instance

Install

$ npm install clone-regexp

Usage

const cloneRegexp = require('clone-regexp');

const regex = /[a-z]/gi;

cloneRegexp(regex);
//=> /[a-z]/gi

cloneRegexp(regex) === regex;
//=> false

cloneRegexp(regex, {global: false});
//=> /[a-z]/i

cloneRegexp(regex, {multiline: true});
//=> /[a-z]/gim

cloneRegexp(regex, {source: 'unicorn'});
//=> /unicorn/gi

API

cloneRegexp(regexp, [options])

regex

Type: RegExp

Regex to clone.

options

Type: Object
Properties: source global ignoreCase multiline dotAll sticky unicode lastIndex

Optionally modify the cloned RegExp instance.

License

MIT © Sindre Sorhus

Versions

Version
2.2.0
1.0.1