Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

is-regex

Package Overview
Dependencies
2
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

is-regex

Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag

    1.1.4latest

Version published
Maintainers
1
Weekly downloads
32,196,985
decreased by-0.39%

Weekly downloads

Changelog

Source

v1.1.4 - 2021-08-05

Commits

  • [Dev Deps] update auto-changelog, core-js, eslint, tape 4b17cad
  • [Refactor] use has-tostringtag to behave correctly in the presence of symbol shams 2dad4af

Readme

Source

is-regex Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS regex? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

var isRegex = require('is-regex'); var assert = require('assert'); assert.notOk(isRegex(undefined)); assert.notOk(isRegex(null)); assert.notOk(isRegex(false)); assert.notOk(isRegex(true)); assert.notOk(isRegex(42)); assert.notOk(isRegex('foo')); assert.notOk(isRegex(function () {})); assert.notOk(isRegex([])); assert.notOk(isRegex({})); assert.ok(isRegex(/a/g)); assert.ok(isRegex(new RegExp('a', 'g')));

Tests

Simply clone the repo, npm install, and run npm test

Keywords

FAQs

What is is-regex?

Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag

Is is-regex popular?

The npm package is-regex receives a total of 26,252,405 weekly downloads. As such, is-regex popularity was classified as popular.

Is is-regex well maintained?

We found that is-regex demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 06 Aug 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc