Regular expression for matching npm organizations
Install
$ npm install org-regex
Usage
const orgRegex = ; ;//=> true 'foo @ava bar @ava/init';//=> ['@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.
Related
- scoped-regex - Check if a string is a scoped npm package name
License
MIT © Siddharth Doshi