is-regex
npmv1.2.1TypeScriptIs this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag
Overview
is-regex is an npm package that is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag. It is extremely widely used, with about 87.6M downloads per week and 1 known dependents in the graph. The latest version is 1.2.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (87.6M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (22 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of is-regex.
Dependencies
Dev (18)
Used by
Popular packages that depend on is-regex.
Alternatives to is-regex
Escape RegExp special characters
Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet
Matches strings against configurable strings, globs, regular expressions, and/or functions
Returns true if a string has an extglob.
Tokenizes a string that represents a regular expression.
ES6 spec-compliant RegExp.prototype.flags shim.
Compile regular expressions using named groups to ES5.
Regular expression for matching a shebang line
Express style path to RegExp utility
detect possibly catastrophic, exponential-time regular expressions
Is this value a JS SharedArrayBuffer?
Match balanced character pairs, like "{" and "}"
Frequently installed together
The semantic version parser used by npm.
Store information about any JS value in a side channel. Uses WeakMap if available.
Get an iterator for any JS language value. Works robustly across all environments, all versions.
ES6 spec-compliant RegExp.prototype.flags shim.
Which kind of boxed JS primitive is this?
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
Robustly `.call.bind()` a function
Array#isArray for older browsers
ES2015-compliant shim for Object.is - differentiates between -0 and +0
Is this an arguments object? It's a harder question than you think.
Is this value a JS SharedArrayBuffer?
An AST-based pattern checker for JavaScript.
Version history
| Version | Published | License |
|---|---|---|
| 1.2.1latest | 1 year ago | MIT |
| 1.2.0 | 1 year ago | MIT |
| 1.1.4 | 5 years ago | MIT |
| 1.1.3 | 5 years ago | MIT |
| 1.1.2 | 5 years ago | MIT |
| 1.1.1 | 6 years ago | MIT |
| 1.1.0 | 6 years ago | MIT |
| 1.0.5 | 6 years ago | MIT |
| 1.0.4 | 9 years ago | MIT |
| 1.0.3 | 11 years ago | MIT |
| 1.0.2 | 11 years ago | MIT |
| 1.0.1 | 11 years ago | MIT |
| 1.0.0 | 12 years ago | MIT |
| 0.0.0 | 12 years ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install is-regex?
Run `npm install is-regex` to add is-regex to your npm project.
What license is is-regex released under?
is-regex is distributed under the MIT license.
How popular is is-regex?
is-regex has approximately 87,611,479 downloads per week and 1 known dependent packages.