{"_id":"matchit","_rev":"925107","name":"matchit","description":"Quickly parse & match URLs","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"time":{"modified":"2021-09-22T09:15:35.000Z","created":"2017-11-05T18:40:22.748Z","1.1.0":"2020-10-05T05:20:59.171Z","1.0.8":"2019-04-04T01:29:27.151Z","1.0.7":"2018-12-10T19:11:54.049Z","1.0.6":"2018-05-19T23:11:39.876Z","1.0.5":"2018-03-09T14:34:30.703Z","1.0.4":"2018-03-06T21:53:04.227Z","1.0.3":"2018-03-06T20:21:30.105Z","1.0.2":"2018-02-14T16:15:38.302Z","1.0.1":"2018-01-23T09:27:27.843Z","1.0.0":"2017-11-07T20:15:00.874Z","0.1.2":"2017-11-05T19:15:04.363Z","0.1.1":"2017-11-05T19:00:18.855Z","0.1.0":"2017-11-05T18:40:22.748Z"},"users":{"kodekracker":true},"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"versions":{"1.1.0":{"name":"matchit","version":"1.1.0","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.mjs","main":"lib/matchit.js","types":"index.d.ts","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=6"},"scripts":{"build":"bundt","bench":"node bench","pretest":"npm run build","prebench":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0"},"devDependencies":{"bundt":"^0.3.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"379e81ebbe2115d0aa695c7ccef5d6c2a9c387c0","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.1.0","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"shasum":"c4ccf17d9c824cc1301edbcffde9b75a61d10a7c","size":4062,"noattachment":false,"key":"/matchit/-/matchit-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.1.0.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.1.0_1601875258978_0.8106507033286143"},"_hasShrinkwrap":false,"publish_time":1601875259171,"_cnpm_publish_time":1601875259171},"1.0.8":{"name":"matchit","version":"1.0.8","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.mjs","main":"lib/matchit.js","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"build":"bundt","bench":"node bench","pretest":"npm run build","prebench":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0"},"devDependencies":{"bundt":"^0.3.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"a4aeaa0509deb9766bb2c16400cb73a68a490b0a","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.8","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"9a129e38f79b2053dd75339215b19e1f6bb88efb","size":3896,"noattachment":false,"key":"/matchit/-/matchit-1.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.8.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.8_1554341367029_0.2774783145088926"},"_hasShrinkwrap":false,"publish_time":1554341367151,"_cnpm_publish_time":1554341367151},"1.0.7":{"name":"matchit","version":"1.0.7","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.mjs","main":"lib/matchit.js","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","build":"node builder","pretest":"node builder","prebench":"node builder","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0"},"devDependencies":{"mk-dirs":"^1.0.0","rewrite-imports":"^1.0.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"118addc27fa662b494c17fb41a682a38cc5ce3ee","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.7","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"6fec56cd0eee7dc11fb5624ed4cd70d40b2ac949","size":3675,"noattachment":false,"key":"/matchit/-/matchit-1.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.7.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.7_1544469113858_0.7178029418734173"},"_hasShrinkwrap":false,"publish_time":1544469114049,"_cnpm_publish_time":1544469114049},"1.0.6":{"name":"matchit","version":"1.0.6","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.es.js","main":"lib/matchit.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","build":"node builder","pretest":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0"},"devDependencies":{"mk-dirs":"^1.0.0","rewrite-imports":"^1.0.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"407609aa0a4ee6b4167187c91aca8ab87bac6803","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.6","_shasum":"825da06468bd324f0219ebe28e12a41bfb5524c4","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"825da06468bd324f0219ebe28e12a41bfb5524c4","size":3645,"noattachment":false,"key":"/matchit/-/matchit-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.6.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.6_1526771499772_0.45931001744116884"},"_hasShrinkwrap":false,"publish_time":1526771499876,"_cnpm_publish_time":1526771499876},"1.0.5":{"name":"matchit","version":"1.0.5","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.es.js","main":"lib/matchit.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","build":"node builder","pretest":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"mk-dirs":"^1.0.0","rewrite-imports":"^1.0.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"4cfee57b463504b31a6da3f67bb979af7d1abf41","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"b24ee14d9957855398e6e9ccf42e9408c00b4274","size":3667,"noattachment":false,"key":"/matchit/-/matchit-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.5.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.5_1520606070646_0.5945358868541928"},"_hasShrinkwrap":false,"publish_time":1520606070703,"_cnpm_publish_time":1520606070703},"1.0.4":{"name":"matchit","version":"1.0.4","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.es.js","main":"lib/matchit.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","build":"node builder","pretest":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"mk-dirs":"^1.0.0","rewrite-imports":"^1.0.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"a17b779a04638d7c3ce40fceb5d46740d99dd2f2","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.4","_shasum":"b9505ab8744b192bdf0a1f419e16990160e386b0","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"b9505ab8744b192bdf0a1f419e16990160e386b0","size":3679,"noattachment":false,"key":"/matchit/-/matchit-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.4.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.4_1520373184139_0.34952354820879905"},"_hasShrinkwrap":false,"publish_time":1520373184227,"_cnpm_publish_time":1520373184227},"1.0.3":{"name":"matchit","version":"1.0.3","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.es.js","main":"lib/matchit.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","build":"node builder","pretest":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"mk-dirs":"^1.0.0","rewrite-imports":"^1.0.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"116f199dbd134f0d69a840a9ee32d6271567c87c","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.3","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"519082bacefabe767e7ac97a1ba2ddabdae9498d","size":3663,"noattachment":false,"key":"/matchit/-/matchit-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.3.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.3_1520367689783_0.18895299695385193"},"_hasShrinkwrap":false,"publish_time":1520367690105,"_cnpm_publish_time":1520367690105},"1.0.2":{"name":"matchit","version":"1.0.2","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"description":"Quickly parse & match URLs","module":"lib/matchit.es.js","main":"lib/matchit.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","build":"node builder","pretest":"npm run build","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"mk-dirs":"^1.0.0","rewrite-imports":"^1.0.0","tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"cfbbc60688d75f592d62826952b257c671a65a7a","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.2","_shasum":"1318eb527d4b733b135ac9d92f0c57350b21dbfe","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"1318eb527d4b733b135ac9d92f0c57350b21dbfe","size":3672,"noattachment":false,"key":"/matchit/-/matchit-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.2.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit_1.0.2_1518624938255_0.5247630527111464"},"_hasShrinkwrap":false,"publish_time":1518624938302,"_cnpm_publish_time":1518624938302},"1.0.1":{"name":"matchit","version":"1.0.1","description":"Quickly parse & match URLs","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"main":"lib/index.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"8f7eb4dcb62e23f39e318dce4bcc4798d30d575f","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.1","_shasum":"8dee9d5d263fa562098c6b552e3adfbae70962e9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"8dee9d5d263fa562098c6b552e3adfbae70962e9","size":3514,"noattachment":false,"key":"/matchit/-/matchit-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.1.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit-1.0.1.tgz_1516699647776_0.14946459885686636"},"directories":{},"publish_time":1516699647843,"_hasShrinkwrap":false,"_cnpm_publish_time":1516699647843},"1.0.0":{"name":"matchit","version":"1.0.0","description":"Quickly parse & match URLs","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"main":"lib/index.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"b2a042cbff36382747503f9d4aa12921724fc9fe","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@1.0.0","_shasum":"a484ccb5e264d97757a48a195c2a98ab3981b47b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"a484ccb5e264d97757a48a195c2a98ab3981b47b","size":3500,"noattachment":false,"key":"/matchit/-/matchit-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-1.0.0.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit-1.0.0.tgz_1510085700584_0.12731653358787298"},"directories":{},"publish_time":1510085700874,"_cnpm_publish_time":1510085700874,"_hasShrinkwrap":false},"0.1.2":{"name":"matchit","version":"0.1.2","description":"Quickly parse & match URLs","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"main":"lib/index.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"bench":"node bench","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"b07323c0bf17b706f7e1fdf7ef3990631f0ed284","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@0.1.2","_shasum":"34af94e27f1754e94fbd5ac3f537022c89fd79f6","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"34af94e27f1754e94fbd5ac3f537022c89fd79f6","size":2813,"noattachment":false,"key":"/matchit/-/matchit-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-0.1.2.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit-0.1.2.tgz_1509909303335_0.6992305773310363"},"directories":{},"publish_time":1509909304363,"_hasShrinkwrap":false,"_cnpm_publish_time":1509909304363},"0.1.1":{"name":"matchit","version":"0.1.1","description":"Quickly parse & match URLs","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"main":"lib/index.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=4"},"scripts":{"bench":"node bench","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"2035fffab67bc0e3fe3e960cbb26f0684c930600","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@0.1.1","_shasum":"4fb54b675c7fd0d032fa02c75cdedb549e805fa5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"4fb54b675c7fd0d032fa02c75cdedb549e805fa5","size":2809,"noattachment":false,"key":"/matchit/-/matchit-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-0.1.1.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit-0.1.1.tgz_1509908418778_0.25905793788842857"},"directories":{},"publish_time":1509908418855,"_hasShrinkwrap":false,"_cnpm_publish_time":1509908418855},"0.1.0":{"name":"matchit","version":"0.1.0","description":"Quickly parse & match URLs","repository":{"type":"git","url":"git+https://github.com/lukeed/matchit.git"},"main":"lib/index.js","license":"MIT","files":["lib"],"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=4"},"scripts":{"bench":"node bench","test":"tape test/*.js | tap-spec"},"keywords":["route","regexp","routing","pattern","match","parse","url"],"dependencies":{"@arr/every":"^1.0.0","@arr/filter":"^1.0.0"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.6.3"},"gitHead":"d3eace654744a5d2ea359a9f6b9cd66c8bf15b5b","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"homepage":"https://github.com/lukeed/matchit#readme","_id":"matchit@0.1.0","_shasum":"f67bb91defe0eb01797ac278d6e32c7a31b4f7f0","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"f67bb91defe0eb01797ac278d6e32c7a31b4f7f0","size":2810,"noattachment":false,"key":"/matchit/-/matchit-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/matchit/download/matchit-0.1.0.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/matchit-0.1.0.tgz_1509907222644_0.8752356029581279"},"directories":{},"publish_time":1509907222748,"_hasShrinkwrap":false,"_cnpm_publish_time":1509907222748}},"readme":"# matchit [![Build Status](https://travis-ci.org/lukeed/matchit.svg?branch=master)](https://travis-ci.org/lukeed/matchit)\n\n> Quickly parse & match URLs\n\n## Install\n\n```\n$ npm install --save matchit\n```\n\n\n## Usage\n\n```js\nconst { exec, match, parse } = require('matchit');\n\nparse('/foo/:bar/:baz?');\n//=> [\n//=>   { old:'/foo/:bar', type:0, val:'foo' },\n//=>   { old:'/foo/:bar', type:1, val:'bar' },\n//=>   { old:'/foo/:bar', type:3, val:'baz' }\n//=> ]\n\nconst routes = ['/', '/foo', 'bar', '/baz', '/baz/:title','/bat/*'].map(parse);\n\nmatch('/', routes);\n//=> [{ old:'/', type:0, val:'/' }]\n\nmatch('/foo', routes);\n//=> [{ old:'/foo', type:0, val:'foo' }]\n\nmatch('/bar', routes);\n//=> [{ old:'bar', type:0, val:'bar' }]\n\nmatch('/baz', routes);\n//=> [{ old:'/baz', type:0, val:'baz' }]\n\nlet a = match('/baz/hello', routes);\n//=> [{...}, {...}]\nlet b = exec('/baz/hello', a);\n//=> { title:'hello' }\n\nmatch('/bat/quz/qut', routes);\n//=> [\n//=>   { old:'/bat/*', type:0, val:'bat' },\n//=>   { old:'/bat/*', type:2, val:'*' }\n//=> ]\n```\n\n\n## API\n\n### matchit.parse(route)\n\nReturns: `Array`\n\nThe `route` is `split` and parsed into a \"definition\" array of objects. Each object (\"segment\") contains a `val`, `type`, and `old` key:\n\n* `old` &mdash; The [`route`](#route)'s original value\n* `type` &mdash; An numerical representation of the segment type.\n    * `0` - static\n    * `1` - parameter\n    * `2` - any/wildcard\n    * `3` - optional param\n* `val` &mdash; The current segment's value. This is either a static value of the name of a parameter\n\n#### route\n\nType: `String`\n\nA single URL pattern.\n\n> **Note:** Input will be stripped of all leading & trailing `/` characters, so there's no need to normalize your own URLs before passing it to `parse`!\n\n\n### matchit.match(url, routes)\n\nReturns: `Array`\n\nReturns the [`route`](#route)'s encoded definition. See [`matchit.parse`](#matchitparseroute).\n\n#### url\n\nType: `String`\n\nThe true URL you want to be matched.\n\n#### routes\n\nType: `Array`\n\n_All_ \"parsed\" route definitions, via [`matchit.parse`](#matchitparseroute).\n\n> **Important:** Multiple routes will require an Array of `matchit.parse` outputs.\n\n\n### matchit.exec(url, match)\n\nReturns: `Object`\n\nReturns an object an object of `key:val` pairs, as defined by your [`route`](#route) pattern.\n\n#### url\n\nType: `String`\n\nThe URL (`pathname`) to evaluate.\n\n> **Important:** This should be `pathname`s only as any `querystring`s will be included the response.\n\n#### match\n\nType: `Array`\n\nThe route definition to use, via [`matchit.match`](#matchitmatchurl-routes).\n\n\n## Benchmarks\n\n> Running Node v10.13.0\n\n```\n# Parsing\n  matchit               x 1,489,482 ops/sec ±2.89% (97 runs sampled)\n  regexparam            x   406,824 ops/sec ±1.38% (96 runs sampled)\n  path-to-regexp        x    83,439 ops/sec ±0.89% (96 runs sampled)\n  path-to-regexp.parse  x   421,266 ops/sec ±0.13% (97 runs sampled)\n\n# Match (index)\n  matchit                x 132,338,546 ops/sec ±0.14% (96 runs sampled)\n  regexparam             x  49,889,162 ops/sec ±0.21% (95 runs sampled)\n  path-to-regexp.exec    x   7,176,721 ops/sec ±1.23% (94 runs sampled)\n  path-to-regexp.tokens  x     102,021 ops/sec ±0.21% (96 runs sampled)\n\n# Match (param)\n  matchit                x 2,700,618 ops/sec ±0.92% (95 runs sampled)\n  regexparam             x 6,924,653 ops/sec ±0.33% (94 runs sampled)\n  path-to-regexp.exec    x 4,715,483 ops/sec ±0.28% (96 runs sampled)\n  path-to-regexp.tokens  x    98,182 ops/sec ±0.45% (93 runs sampled)\n\n# Match (optional)\n  matchit                x 2,816,313 ops/sec ±0.64% (93 runs sampled)\n  regexparam             x 8,437,064 ops/sec ±0.41% (93 runs sampled)\n  path-to-regexp.exec    x 5,909,510 ops/sec ±0.22% (97 runs sampled)\n  path-to-regexp.tokens  x   101,832 ops/sec ±0.43% (98 runs sampled)\n\n# Match (wildcard)\n  matchit                x 3,409,100 ops/sec ±0.34% (98 runs sampled)\n  regexparam             x 9,740,429 ops/sec ±0.49% (95 runs sampled)\n  path-to-regexp.exec    x 8,740,590 ops/sec ±0.43% (89 runs sampled)\n  path-to-regexp.tokens  x   102,109 ops/sec ±0.35% (96 runs sampled)\n\n# Exec\n  matchit         x 1,558,321 ops/sec ±0.33% (96 runs sampled)\n  regexparam      x 6,966,297 ops/sec ±0.21% (97 runs sampled)\n  path-to-regexp  x   102,250 ops/sec ±0.45% (95 runs sampled)\n```\n\n## Related\n\n- [regexparam](https://github.com/lukeed/regexparam) - A similar (285B) utility, but relies on `RegExp` instead of String comparisons.\n\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","_attachments":{},"homepage":"https://github.com/lukeed/matchit#readme","bugs":{"url":"https://github.com/lukeed/matchit/issues"},"license":"MIT"}