is-scoped
Version:
Check if a string is a scoped npm package name
26 lines (16 loc) • 410 B
Markdown
> Check if a string is a [scoped npm package name](https://docs.npmjs.com/misc/scope)
```
$ npm install is-scoped
```
```js
import isScoped from 'is-scoped';
isScoped('@sindresorhus/df');
//=> true
isScoped('cat-names');
//=> false
```
- [scoped-regex](https://github.com/sindresorhus/scoped-regex) - Regular expression for matching scoped npm package names