{"name":"string.prototype.matchall","version":"4.0.5","description":"Spec-compliant polyfill for String.prototype.matchAll","main":"index.js","scripts":{"prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","test":"npm run tests-only","posttest":"npx aud --production","tests-only":"nyc tape 'test/**/*.js'","prelint":"evalmd *.md","lint":"eslint .","postlint":"es-shim-api --bound"},"repository":{"type":"git","url":"git+https://github.com/es-shims/String.prototype.matchAll.git"},"keywords":["ES2020","ES","String.prototype.matchAll","matchAll","match","regex","regexp","regular","expression","matches"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/String.prototype.matchAll/issues"},"homepage":"https://github.com/es-shims/String.prototype.matchAll#readme","dependencies":{"call-bind":"^1.0.2","define-properties":"^1.1.3","es-abstract":"^1.18.2","get-intrinsic":"^1.1.1","has-symbols":"^1.0.2","internal-slot":"^1.0.3","regexp.prototype.flags":"^1.3.1","side-channel":"^1.0.4"},"devDependencies":{"@es-shims/api":"^2.1.2","@ljharb/eslint-config":"^17.6.0","aud":"^1.1.5","es5-shim":"^4.5.15","es6-shim":"^0.35.6","eslint":"^7.27.0","evalmd":"^0.0.19","foreach":"^2.0.5","functions-have-names":"^1.2.2","nyc":"^10.3.2","object-inspect":"^1.10.3","object.assign":"^4.1.2","object.entries":"^1.1.3","safe-publish-latest":"^1.1.4","tape":"^5.2.2"},"gitHead":"06053b8c1605b3a2e40d4645885c1ef380ba13c6","_id":"string.prototype.matchall@4.0.5","_nodeVersion":"16.1.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q==","shasum":"59370644e1db7e4c0c045277690cf7b01203c4da","tarball":"http://registry-npm.ywwl.com/string.prototype.matchall/download/string.prototype.matchall-4.0.5.tgz","fileCount":22,"unpackedSize":36418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrVaxCRA9TVsSAnZWagAAfRAP/1EqnNt5z1XNNMPOeCE3\nXDSGD0z7ppDZ/zgrjtbRf2kNfryZTgN1LIbgYayM5SbTF54xkx3m/k3ZEK2V\nR22y/dHaxXFIsmriS0vqTjguCXcLfWTT5+cjA0dPm0EPnSVUHkXS6d4rpglV\nWXH5k86Ft0pmFdVf3xZActJXZo0zWLsXZBN8MVuk+ZN8FFNCMhtXnAEFv2eV\n8GqoEG2A38QfBEAStphryvGBnIc/OD0n1EqLlb3N2zooEftAHXD4wPJXbJfJ\n6f7ylviVnDhyyclhyS1vxLUKavtt8GnOh1cL2cfqxZOi6hS+FGIGrP5YZbc4\nioneGc1NFpPSWG11zlY1Vqm5ObJXH5Mw5M24ud53pvhI3lulEyYqqqQgB+Tx\nYaJb2Ol/TKzD56SC7VBgbNKIgflbmkI6M6HL/XI4H/r6b2BnR4q1Zm/v4lZ3\nqIzGfeEXa2vdwXoSRYMRtTHCc+iaeW0i8K7pNXoyNNBPBHyO008oby200sK3\nSRSSmUjgqeCskA/R65Ljg/ltGI+un0kSJTZviW8rCnOzQYXZdd03ATMaG/EH\nvh85RWN8WFdZlhlSFDhnVGLvYuvansYOKRSzJIutrfA9uIKSyo+A/7sVNhpK\nUl6RYH+jBXTmaO24ii5QxrwnUH52AycqnooepINmf4L93b815Lh6nQi0JUfD\nnKua\r\n=tkxL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSDeYZO2eX4qID17fgUKWS1a7LCeUadeMwcrrcwXtGKAiEAnizD1hzP1h6wQukykXa4+TLicZAOGuPrhdvUEjMbqRY="}],"size":9940,"noattachment":false,"key":"/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string.prototype.matchall_4.0.5_1621972657144_0.7979941469320295"},"_hasShrinkwrap":false,"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[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-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/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.matchAll\n[actions-url]: https://github.com/es-shims/String.prototype.matchAll/actions\n","publish_time":1621972657293,"_cnpm_publish_time":1621972657293,"dist-tags":{"latest":"4.1.0"}}