@cuba-platform/front-generator
Version:
CUBA Platform front-end clients generator
48 lines (25 loc) • 995 B
Markdown
> Regular expression for matching [scoped npm package names](https://docs.npmjs.com/misc/scope)
```
$ npm install --save scoped-regex
```
```js
const scopedRegex = require('scoped-regex');
scopedRegex({exact: true}).test('@sindresorhus/df');
//=> true
'foo @sindresorhus/df bar'.match(scopedRegex());
//=> ['@sindresorhus/df']
```
Returns a `RegExp` for matching scoped package names.
Type: `boolean`<br>
Default: `false` *(Matches any scoped package names in a string)*
Only match an exact string. Useful with `RegExp
- [is-scoped](https://github.com/sindresorhus/is-scoped) - Check if a string is a scoped npm package name
MIT © [Sindre Sorhus](https://sindresorhus.com)