{"name":"string.prototype.matchall","version":"4.0.12","keywords":["ES2020","ES","String.prototype.matchAll","matchAll","match","regex","regexp","regular","expression","matches"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"string.prototype.matchall@4.0.12","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/es-shims/String.prototype.matchAll#readme","bugs":{"url":"https://github.com/es-shims/String.prototype.matchAll/issues"},"dist":{"shasum":"6c88740e49ad4956b1332a911e949583a275d4c0","tarball":"http://registry-npm.ywwl.com/string.prototype.matchall/download/string.prototype.matchall-4.0.12.tgz","fileCount":18,"integrity":"sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==","signatures":[{"sig":"MEQCICT2gz5HTSEaxHd03TCKjGc/2HaVT18t6+zE3Rce6nJSAiAieoGpxc5GopIH31OVwS1VoIFkLL5ZQPTl0JKhytP1Nw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39819,"size":11515,"noattachment":false,"key":"/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz"},"main":"index.js","engines":{"node":">= 0.4"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"8234255399db94e85e574ec79e4dd534dd33777e","scripts":{"lint":"eslint .","test":"npm run tests-only","prelint":"evalmd *.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"es-shim-api --bound","posttest":"npx npm@'>= 10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/es-shims/String.prototype.matchAll.git","type":"git"},"_npmVersion":"10.9.2","description":"Spec-compliant polyfill for String.prototype.matchAll","directories":{},"_nodeVersion":"23.5.0","dependencies":{"gopd":"^1.2.0","call-bind":"^1.0.8","es-errors":"^1.3.0","call-bound":"^1.0.3","es-abstract":"^1.23.6","has-symbols":"^1.1.0","side-channel":"^1.1.0","get-intrinsic":"^1.2.6","internal-slot":"^1.1.0","es-object-atoms":"^1.0.0","define-properties":"^1.2.1","set-function-name":"^2.0.2","regexp.prototype.flags":"^1.5.3"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false,"startingVersion":"v4.0.5"},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","evalmd":"^0.0.19","encoding":"^0.1.13","es5-shim":"^4.6.7","es6-shim":"^0.35.8","for-each":"^0.3.3","npmignore":"^0.3.1","in-publish":"^2.0.1","@es-shims/api":"^2.5.1","mock-property":"^1.1.0","object.assign":"^4.1.7","auto-changelog":"^2.5.0","object-inspect":"^1.13.3","object.entries":"^1.1.8","safe-publish-latest":"^2.0.0","functions-have-names":"^1.2.3","@ljharb/eslint-config":"^21.1.1"},"_npmOperationalInternal":{"tmp":"tmp/string.prototype.matchall_4.0.12_1734678109419_0.06376785609952207","host":"s3://npm-registry-packages-npm-production"},"readme":"# string.prototype.matchall <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\nES2020 spec-compliant shim for String.prototype.matchAll. Invoke its \"shim\" method to shim `String.prototype.matchAll` if it is unavailable or noncompliant.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment, and complies with the [spec](https://tc39.es/ecma262/#sec-string.prototype.matchall).\n\nMost common usage:\n```js\nconst assert = require('assert');\nconst matchAll = require('string.prototype.matchall');\n\nconst str = 'aabc';\nconst nonRegexStr = 'ab';\nconst globalRegex = /[ac]/g;\nconst nonGlobalRegex = /[bc]/i;\n\n// non-regex arguments are coerced into a global regex\nassert.deepEqual(\n\t[...matchAll(str, nonRegexStr)],\n\t[...matchAll(str, new RegExp(nonRegexStr, 'g'))]\n);\n\nassert.deepEqual([...matchAll(str, globalRegex)], [\n\tObject.assign(['a'], { index: 0, input: str, groups: undefined }),\n\tObject.assign(['a'], { index: 1, input: str, groups: undefined }),\n\tObject.assign(['c'], { index: 3, input: str, groups: undefined }),\n]);\n\nassert.throws(() => matchAll(str, nonGlobalRegex)); // non-global regexes throw\n\nmatchAll.shim(); // will be a no-op if not needed\n\n// non-regex arguments are coerced into a global regex\nassert.deepEqual(\n\t[...str.matchAll(nonRegexStr)],\n\t[...str.matchAll(new RegExp(nonRegexStr, 'g'))]\n);\n\nassert.deepEqual([...str.matchAll(globalRegex)], [\n\tObject.assign(['a'], { index: 0, input: str, groups: undefined }),\n\tObject.assign(['a'], { index: 1, input: str, groups: undefined }),\n\tObject.assign(['c'], { index: 3, input: str, groups: undefined }),\n]);\n\nassert.throws(() => matchAll(str, nonGlobalRegex)); // non-global regexes throw\n\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.com/package/string.prototype.matchall\n[npm-version-svg]: https://versionbadg.es/es-shims/String.prototype.matchAll.svg\n[deps-svg]: https://david-dm.org/es-shims/String.prototype.matchAll.svg\n[deps-url]: https://david-dm.org/es-shims/String.prototype.matchAll\n[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.matchAll/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.matchAll#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/string.prototype.matchall.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/string.prototype.matchall.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/string.prototype.matchall.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.matchall\n[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.matchAll/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.matchAll/\n[actions-image]: https://img.shields.io/github/check-runs/es-shims/String.prototype.matchAll/main\n[actions-url]: https://github.com/es-shims/String.prototype.matchAll/actions\n","publish_time":1734678109564,"_cnpm_publish_time":1734678109564,"dist-tags":{"latest":"4.1.0"}}