scoped-regex

WebJar for scoped-regex

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

scoped-regex
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

scoped-regex
WebJar for scoped-regex
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/scoped-regex

Download scoped-regex

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

scoped-regex

Regular expression for matching scoped npm package names

Install

$ npm install scoped-regex

Usage

const scopedRegex = require('scoped-regex');

scopedRegex({exact: true}).test('@sindresorhus/df');
//=> true

'foo @sindresorhus/df bar'.match(scopedRegex());
//=> ['@sindresorhus/df']

API

scopedRegex([options])

Returns a RegExp for matching scoped package names.

options

Type: Object

exact

Type: boolean
Default: false (Matches any scoped package names in a string)

Only match an exact string. Useful with RegExp#test() to check if a string is a scoped package name.

Related

  • is-scoped - Check if a string is a scoped npm package name

License

MIT © Sindre Sorhus

Versions

Version
1.0.0