org-regex
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    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.

    Related

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

    License

    MIT © Siddharth Doshi

    Install

    npm i org-regex

    DownloadsWeekly Downloads

    50,007

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.37 kB

    Total Files

    5

    Last publish

    Collaborators

    • sidoshi