or

org-regex

Regular expression for matching npm organizations

Showing:

Popularity

Downloads/wk

38.9K

GitHub Stars

0

Maintenance

Last Commit

3yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

org-regex Build Status

Regular expression for matching npm organizations

Install

$ npm install org-regex

Usage

const orgRegex = require('org-regex');

orgRegex({exact: true}).test('@ava');
//=> true

'foo @ava bar @ava/init'.match(orgRegex());
//=> ['@ava']

API

orgRegex([options])

Returns a RegExp for matching npm organization names.

options

Type: Object

exact

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

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

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

License

MIT © Siddharth Doshi

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial