{"name":"is-regex","version":"1.2.1","description":"Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag","author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","main":"index.js","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run lint","test":"npm run tests-only && npm run test:harmony","tests-only":"nyc node test","test:harmony":"nyc node --harmony --es-staging test","test:corejs":"nyc tape test-corejs.js","posttest":"npx npm@'>=10.2' audit --production","prelint":"eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')","lint":"eslint --ext=js,mjs .","postlint":"tsc -p . && attw -P","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git://github.com/inspect-js/is-regex.git"},"bugs":{"url":"https://github.com/inspect-js/is-regex/issues"},"homepage":"https://github.com/inspect-js/is-regex","keywords":["regex","regexp","is","regular expression","regular","expression"],"dependencies":{"call-bound":"^1.0.2","gopd":"^1.2.0","has-tostringtag":"^1.0.2","hasown":"^2.0.2"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/core-js":"^2.5.8","@types/for-each":"^0.3.3","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","core-js":"^3.39.0","eclint":"^2.8.1","encoding":"^0.1.13","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"^5.8.0-dev.20241129"},"testling":{"files":"test/index.js","browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2"]},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test-corejs.js"]},"_id":"is-regex@1.2.1","gitHead":"7c5a8cf9456d3cfe5e905bc620acb0e1bad61812","types":"./index.d.ts","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==","shasum":"76d70a3ed10ef9be48eb577887d74205bf0cad22","tarball":"http://registry-npm.ywwl.com/is-regex/download/is-regex-1.2.1.tgz","fileCount":11,"unpackedSize":35732,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIz90CFMJBX1/mM/Jr1ADgsDWsSrgaRpKy3O8+dRhO3wIgRPmESe0CtdTeD2/nrnCZ+4QvAaVzzqKH+nnUI9BvDGo="}],"size":12196,"noattachment":false,"key":"/is-regex/-/is-regex-1.2.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-regex_1.2.1_1733982247685_0.6892663743932181"},"_hasShrinkwrap":false,"readme":"# is-regex <sup>[![Version Badge][2]][1]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][5]][6]\n[![dev dependency status][7]][8]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\nIs this value a JS regex?\nThis module works cross-realm/iframe, and despite ES6 @@toStringTag.\n\n## Example\n\n```js\nvar isRegex = require('is-regex');\nvar assert = require('assert');\n\nassert.notOk(isRegex(undefined));\nassert.notOk(isRegex(null));\nassert.notOk(isRegex(false));\nassert.notOk(isRegex(true));\nassert.notOk(isRegex(42));\nassert.notOk(isRegex('foo'));\nassert.notOk(isRegex(function () {}));\nassert.notOk(isRegex([]));\nassert.notOk(isRegex({}));\n\nassert.ok(isRegex(/a/g));\nassert.ok(isRegex(new RegExp('a', 'g')));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/is-regex\n[2]: https://versionbadg.es/inspect-js/is-regex.svg\n[5]: https://david-dm.org/inspect-js/is-regex.svg\n[6]: https://david-dm.org/inspect-js/is-regex\n[7]: https://david-dm.org/inspect-js/is-regex/dev-status.svg\n[8]: https://david-dm.org/inspect-js/is-regex#info=devDependencies\n[11]: https://nodei.co/npm/is-regex.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/is-regex.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/is-regex.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=is-regex\n[codecov-image]: https://codecov.io/gh/inspect-js/is-regex/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/is-regex/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-regex\n[actions-url]: https://github.com/inspect-js/is-regex/actions\n","publish_time":1733982247833,"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_cnpm_publish_time":1733982247833,"dist-tags":{"latest":"1.2.1"}}