{"_id":"mismatch","_rev":"299730","name":"mismatch","description":"A JavaScript package to return captured groups of a regular expression as an object.","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:04:14.000Z","created":"2018-07-21T04:18:03.061Z","1.2.0":"2019-04-23T14:40:52.466Z","1.1.1":"2019-04-08T16:05:32.240Z","1.1.0":"2019-04-02T17:01:27.558Z","1.0.3":"2018-09-17T11:06:06.371Z","1.0.2":"2018-08-15T13:44:56.426Z","1.0.1":"2018-07-21T04:31:04.878Z","1.0.0":"2018-07-21T04:18:03.061Z"},"users":{},"author":{"name":"Anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"versions":{"1.2.0":{"name":"mismatch","version":"1.2.0","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"alamode src -o build -s"},"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"alamode":"^1.9.3","documentary":"^1.24.1","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.11.6"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.2.0","dist":{"shasum":"3f5021861e8084e36a14c2c1f9489941cd18f790","size":3741,"noattachment":false,"key":"/mismatch/-/mismatch-1.2.0.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.2.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.2.0_1556030452328_0.5498312081599226"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:12.327Z","publish_time":1556030452466,"_cnpm_publish_time":1556030452466},"1.1.1":{"name":"mismatch","version":"1.1.1","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"alamode src -o build -s"},"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"alamode":"^1.9.2","documentary":"^1.23.4","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.11.4"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.1.1","dist":{"shasum":"db632cf3adc2cf9ba5ae917e1336d2005f40b232","size":3333,"noattachment":false,"key":"/mismatch/-/mismatch-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.1.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.1.1_1554739532105_0.5263626597787907"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:12.243Z","publish_time":1554739532240,"_cnpm_publish_time":1554739532240},"1.1.0":{"name":"mismatch","version":"1.1.0","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"alamode src -o build -s"},"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"alamode":"1.9.0","documentary":"1.23.2","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"3.11.2"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.1.0","dist":{"shasum":"0f5cee695d3afa0f909f87fab34fe9ac63f8c064","size":3260,"noattachment":false,"key":"/mismatch/-/mismatch-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.1.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.1.0_1554224487437_0.7450301365736471"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:11.392Z","publish_time":1554224487558,"_cnpm_publish_time":1554224487558},"1.0.3":{"name":"mismatch","version":"1.0.3","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"alamode src -o build"},"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"alamode":"1.5.0","documentary":"1.16.1","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"3.3.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.0.3","dist":{"shasum":"416cbe164971a8eafc6f3a68c7c63a77bdf06bfb","size":3597,"noattachment":false,"key":"/mismatch/-/mismatch-1.0.3.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.0.3.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.0.3_1537182366239_0.3793483558748838"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:10.527Z","publish_time":1537182366371,"_cnpm_publish_time":1537182366371},"1.0.2":{"name":"mismatch","version":"1.0.2","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build","scripts":{"t":"zoroaster -b","test":"zoroaster -b test/spec","test-build":"BABEL_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"alamode src -o build"},"files":["build"],"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"alamode":"1.1.0","documentary":"1.10.0","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"2.1.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.0.2","dist":{"shasum":"80262a922a420b7ace005195ee14508787d9072f","size":2976,"noattachment":false,"key":"/mismatch/-/mismatch-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.0.2.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.0.2_1534340696356_0.9141284853987113"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:09.642Z","publish_time":1534340696426,"_cnpm_publish_time":1534340696426},"1.0.1":{"name":"mismatch","version":"1.0.1","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build","scripts":{"t":"zoroaster -b","test":"zoroaster -b test/spec","test-build":"BABEL_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"b --source-maps"},"files":["build"],"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"documentary":"1.10.0","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"2.1.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.0.1","dist":{"shasum":"edf28129b34cfc94f009d0619894dc03237006ed","size":3591,"noattachment":false,"key":"/mismatch/-/mismatch-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.0.1_1532147464814_0.4438502709232153"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:08.784Z","publish_time":1532147464878,"_cnpm_publish_time":1532147464878},"1.0.0":{"name":"mismatch","version":"1.0.0","description":"A JavaScript package to return captured groups of a regular expression as an object.","main":"build","scripts":{"t":"zoroaster -b","test":"zoroaster -b test/spec","test-build":"BABEL_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test -w","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js","example/extra.js":"yarn e example/extra","build":"yarn-s b doc","b":"b --source-maps"},"files":["build"],"repository":{"type":"git","url":"git://github.com/artdecocode/mismatch.git"},"keywords":["mismatch","regex","regexp","re","exec","replace","regular","expression","match","regular expression"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"homepage":"https://github.com/artdecocode/mismatch#readme","devDependencies":{"documentary":"1.10.0","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"2.1.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mismatch@1.0.0","dist":{"shasum":"e0f812542cdf5f80e84b096b71159546eca068a3","size":3594,"noattachment":false,"key":"/mismatch/-/mismatch-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/mismatch/download/mismatch-1.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mismatch_1.0.0_1532146682993_0.8840988714293554"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:07.906Z","publish_time":1532146683061,"_cnpm_publish_time":1532146683061}},"readme":"# mismatch\n\n[![npm version](https://badge.fury.io/js/mismatch.svg)](https://npmjs.org/package/mismatch)\n\n`mismatch` is a JavaScript package to return captured groups of a regular expression as objects in an array.\n\n```sh\nyarn add mismatch\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/0.svg?sanitize=true\"></a></p>\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n  * [`mismatch(re: RegExp, string: string, keys: string[], addPosition?: boolean)`](#mismatchre-regexpstring-stringkeys-stringaddposition-boolean-void)\n- [Copyright](#copyright)\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/1.svg?sanitize=true\"></a></p>\n\n## API\n\nThe package is available by importing its default function:\n\n```js\nimport mismatch from 'mismatch'\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/2.svg?sanitize=true\" width=\"25\"></a></p>\n\n### `mismatch(`<br/>&nbsp;&nbsp;`re: RegExp,`<br/>&nbsp;&nbsp;`string: string,`<br/>&nbsp;&nbsp;`keys: string[],`<br/>&nbsp;&nbsp;`addPosition?: boolean,`<br/>`): void`\n\nThe function will attempt to find all matches for a given regular expression in a string using `.replace()` method, construct an object consisting of captured groups based on supplied keys, and return those objects as an array. It has an advantage over iterating over `while(RegExp.exec(string))` pattern because it does not modify the regular expression's `lastIndex` property.\n\n```js\n/* yarn example/ */\nimport mismatch from 'mismatch'\n\nconst re = /(\\w+)=\"(.+?)\"/g\nconst string = `\n<script\n  crossorigin=\"anonymous\"\n  src=\"https://static.npmjs.com/commons.js\"\n  integrity=\"sha512-example/rhb92Zdom+ix+AYtqZ7C1DlLKEA==\"\n></script>\n`\nconst keys = ['attribute', 'value']\nconst res = mismatch(re, string, keys)\nconsole.log(JSON.stringify(res, null, 2))\n```\n\n```json\n[\n  {\n    \"attribute\": \"crossorigin\",\n    \"value\": \"anonymous\"\n  },\n  {\n    \"attribute\": \"src\",\n    \"value\": \"https://static.npmjs.com/commons.js\"\n  },\n  {\n    \"attribute\": \"integrity\",\n    \"value\": \"sha512-example/rhb92Zdom+ix+AYtqZ7C1DlLKEA==\"\n  }\n]\n```\n\nIf an optional capturing group was not found, its key will not be included as part of the object. Also, if there are more captured groups than keys, they will also not be included.\n\n```js\n/* yarn example/extra.js */\nimport mismatch from 'mismatch'\n\nconst re = /(?: type=\"(.+?)\")?\\s+crossorigin=\"(.+?)\"\\s+src=\"(.+?)\"/g\nconst string = `\n<script\n  crossorigin=\"anonymous\"\n  src=\"https://static.npmjs.com/commons.js\"\n  integrity=\"sha512-example/rhb92Zdom+ix+AYtqZ7C1DlLKEA==\"\n></script>\n`\nconst keys = ['type', 'crossorigin']\nconst res = mismatch(re, string, keys)\nconsole.log(JSON.stringify(res, null, 2))\n```\n```json\n[\n  {\n    \"crossorigin\": \"anonymous\"\n  }\n]\n```\n\nTo additionally add the positions at which the matches was found, the last argument, `addPositions` should be set to _true_.\n\n```js\n/* yarn example/ */\nimport mismatch from 'mismatch'\n\nconst re = /(\\w+)=\"(.+?)\"/g\nconst string = `\n<script\n  crossorigin=\"anonymous\"\n  src=\"https://static.npmjs.com/commons.js\"\n  integrity=\"sha512-example/rhb92Zdom+ix+AYtqZ7C1DlLKEA==\"\n></script>\n`\nconst keys = ['attribute', 'value']\nconst res = mismatch(re, string, keys, true)\nconsole.log(JSON.stringify(res, null, 2))\n```\n```json\n[\n  {\n    \"position\": 11,\n    \"attribute\": \"crossorigin\",\n    \"value\": \"anonymous\"\n  },\n  {\n    \"position\": 37,\n    \"attribute\": \"src\",\n    \"value\": \"https://static.npmjs.com/commons.js\"\n  },\n  {\n    \"position\": 81,\n    \"attribute\": \"integrity\",\n    \"value\": \"sha512-example/rhb92Zdom+ix+AYtqZ7C1DlLKEA==\"\n  }\n]\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/3.svg?sanitize=true\"></a></p>\n\n## Copyright\n\n<table>\n  <tr>\n    <th>\n      <a href=\"https://artd.eco\">\n        <img src=\"https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png\" alt=\"Art Deco\" />\n      </a>\n    </th>\n    <th>© <a href=\"https://artd.eco\">Art Deco</a>   2019</th>\n    <th>\n      <a href=\"https://www.technation.sucks\" title=\"Tech Nation Visa\">\n        <img src=\"https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif\"\n          alt=\"Tech Nation Visa\" />\n      </a>\n    </th>\n    <th><a href=\"https://www.technation.sucks\">Tech Nation Visa Sucks</a></th>\n  </tr>\n</table>\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/-1.svg?sanitize=true\"></a></p>","_attachments":{},"homepage":"https://github.com/artdecocode/mismatch#readme","bugs":{"url":"https://github.com/artdecocode/mismatch/issues"},"license":"MIT"}