Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org-regex

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org-regex

Regular expression for matching npm organization names

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 30 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc