{"_id":"safe-regex-test","_rev":"3734428","name":"safe-regex-test","description":"Give a regex, get a robust predicate function that tests it against a string.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T06:13:49.000Z","created":"2022-09-22T20:09:32.516Z","1.1.0":"2024-12-12T18:49:07.155Z","1.0.3":"2024-02-06T16:49:51.480Z","1.0.2":"2024-01-11T18:11:12.957Z","1.0.1":"2024-01-09T18:22:34.837Z","1.0.0":"2022-09-22T20:09:32.516Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ljharb/safe-regex-test.git"},"versions":{"1.1.0":{"name":"safe-regex-test","version":"1.1.0","description":"Give a regex, get a robust predicate function that tests it against a string.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","tests-only":"nyc tape test","test":"npm run tests-only","posttest":"npx npm@'>= 10.2' audit --production"},"repository":{"type":"git","url":"git+https://github.com/ljharb/safe-regex-test.git"},"keywords":["regex","regexp","test","tester","safe","robust","exec"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/safe-regex-test/issues"},"homepage":"https://github.com/ljharb/safe-regex-test#readme","dependencies":{"call-bound":"^1.0.2","es-errors":"^1.3.0","is-regex":"^1.2.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/for-each":"^0.3.3","@types/object-inspect":"^1.13.0","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","encoding":"^0.1.13","es-value-fixtures":"^1.5.0","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.3","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"safe-regex-test@1.1.0","gitHead":"ea4173e88d68d8e9a95717fa5548a3ea524c2dc9","types":"./index.d.ts","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"shasum":"7f87dfb67a3150782eaaf18583ff5d1711ac10c1","size":5064,"noattachment":false,"key":"/safe-regex-test/-/safe-regex-test-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-regex-test/download/safe-regex-test-1.1.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/safe-regex-test_1.1.0_1734029346965_0.03954500135011396"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-12T18:49:07.155Z","publish_time":1734029347155,"_source_registry_name":"default","_cnpm_publish_time":1734029347155},"1.0.3":{"name":"safe-regex-test","version":"1.0.3","description":"Give a regex, get a robust predicate function that tests it against a string.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","lint":"eslint --ext=js,mjs .","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","tests-only":"nyc tape test","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/ljharb/safe-regex-test.git"},"keywords":["regex","regexp","test","tester","safe","robust","exec"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/safe-regex-test/issues"},"homepage":"https://github.com/ljharb/safe-regex-test#readme","dependencies":{"call-bind":"^1.0.6","es-errors":"^1.3.0","is-regex":"^1.1.4"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.4","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"safe-regex-test@1.0.3","gitHead":"978388dfba128491c16ecafbbda3a1d159db7e03","_nodeVersion":"21.6.0","_npmVersion":"10.2.4","dist":{"shasum":"a5b4c0f06e0ab50ea2c395c14d8371232924c377","size":4408,"noattachment":false,"key":"/safe-regex-test/-/safe-regex-test-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-regex-test/download/safe-regex-test-1.0.3.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-regex-test_1.0.3_1707238191347_0.0823124099114323"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-06T16:49:51.480Z","publish_time":1707238191480,"_source_registry_name":"default","_cnpm_publish_time":1707238191480},"1.0.2":{"name":"safe-regex-test","version":"1.0.2","description":"Give a regex, get a robust predicate function that tests it against a string.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","lint":"eslint --ext=js,mjs .","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","tests-only":"nyc tape test","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/ljharb/safe-regex-test.git"},"keywords":["regex","regexp","test","tester","safe","robust","exec"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/safe-regex-test/issues"},"homepage":"https://github.com/ljharb/safe-regex-test#readme","dependencies":{"call-bind":"^1.0.5","get-intrinsic":"^1.2.2","is-regex":"^1.1.4"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.4","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.2"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"safe-regex-test@1.0.2","gitHead":"db32692fd3574dd5d4b2d82fc898233843a59151","_nodeVersion":"21.5.0","_npmVersion":"10.2.4","dist":{"shasum":"3ba32bdb3ea35f940ee87e5087c60ee786c3f6c5","size":4256,"noattachment":false,"key":"/safe-regex-test/-/safe-regex-test-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-regex-test/download/safe-regex-test-1.0.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-regex-test_1.0.2_1704996672817_0.9234089090647064"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-11T18:11:12.957Z","publish_time":1704996672957,"_source_registry_name":"default","_cnpm_publish_time":1704996672957},"1.0.1":{"name":"safe-regex-test","version":"1.0.1","description":"Give a regex, get a robust predicate function that tests it against a string.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":"false","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","lint":"eslint --ext=js,mjs .","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","tests-only":"nyc tape test","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/ljharb/safe-regex-test.git"},"keywords":["regex","regexp","test","tester","safe","robust","exec"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/safe-regex-test/issues"},"homepage":"https://github.com/ljharb/safe-regex-test#readme","dependencies":{"call-bind":"^1.0.5","get-intrinsic":"^1.2.2","is-regex":"^1.1.4"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.4","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.2"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"safe-regex-test@1.0.1","gitHead":"83069260d7da4d6de58ee6a1e70cc5d1866c52ea","_nodeVersion":"21.5.0","_npmVersion":"10.2.4","dist":{"shasum":"207369b445fd007e534864635b28b2ae7b105783","size":4185,"noattachment":false,"key":"/safe-regex-test/-/safe-regex-test-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-regex-test/download/safe-regex-test-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-regex-test_1.0.1_1704824554658_0.2620516780988622"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-09T18:22:34.837Z","publish_time":1704824554837,"_source_registry_name":"default","_cnpm_publish_time":1704824554837},"1.0.0":{"name":"safe-regex-test","version":"1.0.0","description":"Give a regex, get a robust predicate function that tests it against a string.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","lint":"eslint --ext=js,mjs .","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","tests-only":"tape test","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/ljharb/safe-regex-test.git"},"keywords":["regex","regexp","test","tester","safe","robust","exec"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/safe-regex-test/issues"},"homepage":"https://github.com/ljharb/safe-regex-test#readme","dependencies":{"call-bind":"^1.0.2","get-intrinsic":"^1.1.3","is-regex":"^1.1.4"},"devDependencies":{"@ljharb/eslint-config":"^21.0.0","aud":"^2.0.1","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.0","object-inspect":"^1.12.2","safe-publish-latest":"^2.0.0","tape":"^5.6.1"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"5ff385f943afbe6d23a0e01e5e0444d88b4bee93","_id":"safe-regex-test@1.0.0","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"shasum":"793b874d524eb3640d1873aad03596db2d4f2295","size":3361,"noattachment":false,"key":"/safe-regex-test/-/safe-regex-test-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-regex-test/download/safe-regex-test-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-regex-test_1.0.0_1663877372366_0.8444957878612933"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-22T20:18:33.629Z","publish_time":1663877372516,"_cnpm_publish_time":1663877372516}},"readme":"# safe-regex-test <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nGive a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later.\n\n## Getting started\n\n```sh\nnpm install --save safe-regex-test\n```\n\n## Usage/Examples\n\n```js\nvar regexTester = require('safe-regex-test');\nvar assert = require('assert');\n\nvar tester = regexTester('a');\nassert.ok(tester('a'));\nassert.notOk(tester('b'));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/safe-regex-test\n[npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg\n[deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg\n[deps-url]: https://david-dm.org/ljharb/safe-regex-test\n[dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/safe-regex-test.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test\n[codecov-image]: https://codecov.io/gh/ljharb/safe-regex-test/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/safe-regex-test/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-regex-test\n[actions-url]: https://github.com/ljharb/safe-regex-test/actions\n","_attachments":{},"homepage":"https://github.com/ljharb/safe-regex-test#readme","bugs":{"url":"https://github.com/ljharb/safe-regex-test/issues"},"license":"MIT"}