{"_id":"url-pattern","_rev":"1214052","name":"url-pattern","description":"easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"time":{"modified":"2021-10-13T05:47:03.000Z","created":"2012-12-04T15:15:36.405Z","1.0.3":"2016-11-17T15:11:56.533Z","1.0.2":"2016-10-18T19:47:55.484Z","1.0.1":"2015-12-29T17:35:11.135Z","1.0.0":"2015-12-19T11:54:14.211Z","0.10.2":"2015-09-09T22:15:59.242Z","0.10.1":"2015-09-09T16:40:04.065Z","0.10.0":"2015-08-19T19:11:36.906Z","0.9.0":"2015-05-18T12:56:27.392Z","0.8.0":"2015-04-24T15:44:58.013Z","0.7.1":"2015-04-11T17:08:09.186Z","0.7.0":"2015-03-22T23:43:48.317Z","0.6.0":"2014-05-09T11:25:53.195Z","0.5.0":"2014-03-11T12:45:21.137Z","0.4.0":"2014-02-19T20:14:42.092Z","0.3.1":"2014-01-31T23:20:53.298Z","0.2.2":"2013-11-24T18:53:48.681Z","0.2.1":"2013-05-21T13:29:12.056Z","0.2.0":"2012-12-05T15:57:53.914Z","0.1.0":"2012-12-04T15:15:36.405Z"},"users":{"taddei":true,"thebearingedge":true,"krampstudio":true,"kossnocorp":true,"tunnckocore":true,"dwayneford":true,"bottleliu":true,"igorissen":true,"aslezak":true,"newworldcode":true,"roscoe93":true,"simonfan":true,"vaju":true,"antixrist":true,"johncido":true,"tcrowe":true,"keenwon":true,"eugene.tsukanov":true,"ezodude":true,"xiechao06":true},"author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"versions":{"1.0.3":{"name":"url-pattern","version":"1.0.3","description":"easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"license":"MIT","engines":{"node":">=0.12.0"},"dependencies":{},"devDependencies":{"codecov.io":"0.1.6","coffee-script":"1.10.0","coffeeify":"2.0.1","coffeetape":"1.0.1","istanbul":"0.4.1","tape":"4.2.2","zuul":"3.8.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"coffeetape test/*","test-with-coverage":"istanbul cover coffeetape test/* && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","test-in-browsers":"zuul test/*","test-zuul-local":"zuul --local 8080 test/*"},"typings":"index.d.ts","gitHead":"195d77082e438bcacaf095ecb812d80eeac456ae","_id":"url-pattern@1.0.3","_shasum":"0409292471b24f23c50d65a47931793d2b5acfc1","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"0409292471b24f23c50d65a47931793d2b5acfc1","size":18722,"noattachment":false,"key":"/url-pattern/-/url-pattern-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-1.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/url-pattern-1.0.3.tgz_1479395515849_0.921505456790328"},"directories":{},"publish_time":1479395516533,"_cnpm_publish_time":1479395516533,"_hasShrinkwrap":false},"1.0.2":{"name":"url-pattern","version":"1.0.2","description":"easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"license":"MIT","engines":{"node":">=0.12.0"},"dependencies":{},"devDependencies":{"codecov.io":"0.1.6","coffee-script":"1.10.0","coffeeify":"2.0.1","coffeetape":"1.0.1","istanbul":"0.4.1","tape":"4.2.2","zuul":"3.8.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"coffeetape test/*","test-with-coverage":"istanbul cover coffeetape test/* && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","test-in-browsers":"zuul test/*","test-zuul-local":"zuul --local 8080 test/*"},"typings":"index.d.ts","gitHead":"d78ed6ddf8df91bbcea08aa4ae6086fe2baa31f5","_id":"url-pattern@1.0.2","_shasum":"cc7a8bc813558c9ddf56f7b02b8104df436008e9","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"cc7a8bc813558c9ddf56f7b02b8104df436008e9","size":18720,"noattachment":false,"key":"/url-pattern/-/url-pattern-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-1.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/url-pattern-1.0.2.tgz_1476820074785_0.5370145905762911"},"directories":{},"publish_time":1476820075484,"_cnpm_publish_time":1476820075484,"_hasShrinkwrap":false},"1.0.1":{"name":"url-pattern","version":"1.0.1","description":"easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"license":"MIT","engines":{"node":">=0.12.0"},"dependencies":{},"devDependencies":{"codecov.io":"0.1.6","coffee-script":"1.10.0","coffeeify":"2.0.1","coffeetape":"1.0.1","istanbul":"0.4.1","tape":"4.2.2","zuul":"3.8.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"coffeetape test/*","test-with-coverage":"istanbul cover coffeetape test/* && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","test-in-browsers":"zuul test/*","test-zuul-local":"zuul --local 8080 test/*"},"gitHead":"41ddfece274a6fb840a97d04e3ae047e6414b861","_id":"url-pattern@1.0.1","_shasum":"a1491ad1cfa4d6adc6c968a5220b92e86f055690","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"a1491ad1cfa4d6adc6c968a5220b92e86f055690","size":18318,"noattachment":false,"key":"/url-pattern/-/url-pattern-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-1.0.1.tgz"},"directories":{},"publish_time":1451410511135,"_cnpm_publish_time":1451410511135,"_hasShrinkwrap":false},"1.0.0":{"name":"url-pattern","version":"1.0.0","description":"easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.12.0"},"dependencies":{},"devDependencies":{"codecov.io":"0.1.6","coffee-script":"1.10.0","coffeeify":"2.0.1","coffeetape":"1.0.1","istanbul":"0.4.1","tape":"4.2.2","zuul":"3.8.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"coffeetape test/*","test-with-coverage":"istanbul cover coffeetape test/* && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","test-in-browsers":"zuul test/*","test-zuul-local":"zuul --local 8080 test/*"},"gitHead":"12b1a87fb7ece58bfb529a6394ffb1a127ae1690","_id":"url-pattern@1.0.0","_shasum":"daef75b241be92c6d206818785fe626014ded91e","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"daef75b241be92c6d206818785fe626014ded91e","size":18326,"noattachment":false,"key":"/url-pattern/-/url-pattern-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-1.0.0.tgz"},"directories":{},"publish_time":1450526054211,"_cnpm_publish_time":1450526054211,"_hasShrinkwrap":false},"0.10.2":{"name":"url-pattern","version":"0.10.2","description":"easier than regex string matching patterns for urls, domains, filepaths and other strings. turn strings into data or data into strings.","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.12.0"},"dependencies":{},"devDependencies":{"codecov.io":"0.1.6","coffee-script":"1.10.0","coffeeify":"1.1.0","coffeetape":"1.0.1","istanbul":"0.3.19","tape":"4.2.0","zuul":"3.4.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"coffeetape test/*","test-with-coverage":"istanbul cover coffeetape test/* && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","test-in-browsers":"zuul test/*","test-zuul-local":"zuul --local 8080 test/*"},"gitHead":"af02150b2df0802afa1dd279d181321433b8c896","_id":"url-pattern@0.10.2","_shasum":"e9f07104982b72312db4473dd86a527b580015da","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"e9f07104982b72312db4473dd86a527b580015da","size":17373,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.10.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.10.2.tgz"},"directories":{},"publish_time":1441836959242,"_cnpm_publish_time":1441836959242,"_hasShrinkwrap":false},"0.10.1":{"name":"url-pattern","version":"0.10.1","description":"easier than regex string matching patterns for urls, domains, filepaths and other strings. turn strings into data or data into strings.","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.12.0"},"dependencies":{},"devDependencies":{"codecov.io":"0.1.6","coffee-script":"1.9.3","coffeeify":"1.1.0","coffeetape":"1.0.1","istanbul":"0.3.18","tape":"4.2.0","zuul":"3.3.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"coffeetape test/*","test-with-coverage":"istanbul cover coffeetape test/* && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","test-in-browsers":"zuul test/*","test-zuul-local":"zuul --local 8080 test/*"},"gitHead":"1725106d914f0691e4a78a46e719c46d4601f122","_id":"url-pattern@0.10.1","_shasum":"068c917db3656d5b044bf5eebc36b9dccba39904","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"068c917db3656d5b044bf5eebc36b9dccba39904","size":17703,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.10.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.10.1.tgz"},"directories":{},"publish_time":1441816804065,"_cnpm_publish_time":1441816804065,"_hasShrinkwrap":false},"0.10.0":{"name":"url-pattern","version":"0.10.0","description":"easier than regex string matching for urls, domains, filepaths and other strings. can capture named parts of strings and conveniently returns them as objects. also does the reverse and generates strings given a pattern and such an object. great for routin","keywords":["url","string","matching","pattern","matching","routing","route","regex","match","segment","parsing","parser","parse","combinator","combinators","custom","customizable","filepath","path","domain","separator","stringify","generate","text","processing"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"},{"name":"caasi Huang","url":"https://github.com/caasi"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.10.0"},"dependencies":{},"devDependencies":{"coffee-script":"1.9.3","tape":"4.2.0","coffeetape":"1.0.1","istanbul":"0.3.18","zuul":"3.3.0","coffeeify":"1.1.0"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"istanbul cover -x test coffeetape test/*","test-zuul-local":"zuul --local 8080 test/*","test-zuul":"zuul test/*"},"gitHead":"1afabd1dbc3011c381a6068ea3746d11d20e61ef","_id":"url-pattern@0.10.0","_shasum":"e950dbbd6aff2fc14e7ba4e66cadf5a5dd26b975","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"e950dbbd6aff2fc14e7ba4e66cadf5a5dd26b975","size":40753,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.10.0.tgz"},"directories":{},"publish_time":1440011496906,"_cnpm_publish_time":1440011496906,"_hasShrinkwrap":false},"0.9.0":{"name":"url-pattern","version":"0.9.0","description":"url-pattern is simple pattern matching and segment extraction for urls, domains, filepaths and other strings","keywords":["url","pattern","matching","routing","route","regex","match","segment","parsing","parser","path","domain","separator"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"},{"name":"Kate Hudson","url":"https://github.com/k88hudson"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.10.0"},"dependencies":{},"devDependencies":{"nodeunit":"0.9.1","coffee-script":"1.9.2"},"main":"lib/url-pattern","scripts":{"compile":"coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"nodeunit test/*.coffee"},"gitHead":"1387f081a2eb57b9811f1abfee3a4803770def37","_id":"url-pattern@0.9.0","_shasum":"9b424afeedf3fae6771110628acf229dab0bf644","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"9b424afeedf3fae6771110628acf229dab0bf644","size":8917,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.9.0.tgz"},"directories":{},"publish_time":1431953787392,"_cnpm_publish_time":1431953787392,"_hasShrinkwrap":false},"0.8.0":{"name":"url-pattern","version":"0.8.0","description":"url-pattern is simple pattern matching and segment extraction for urls, domains, filepaths and other strings","keywords":["url","pattern","matching","routing","route","regex","match","segment","parsing","parser","path","domain","separator"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.10.0"},"dependencies":{},"devDependencies":{"nodeunit":"0.9.1","coffee-script":"1.9.2"},"main":"lib/url-pattern","scripts":{"compile":"node_modules/coffee-script/bin/coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"node_modules/nodeunit/bin/nodeunit test/*.coffee"},"gitHead":"0da61f8eb972dd51cb81b100759b3c15bd58d854","_id":"url-pattern@0.8.0","_shasum":"f918e0f7b87579b14e2d6b8ded5215ea5e7e18de","_from":".","_npmVersion":"2.7.5","_nodeVersion":"1.6.4","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"f918e0f7b87579b14e2d6b8ded5215ea5e7e18de","size":6770,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.8.0.tgz"},"directories":{},"publish_time":1429890298013,"_cnpm_publish_time":1429890298013,"_hasShrinkwrap":false},"0.7.1":{"name":"url-pattern","version":"0.7.1","description":"url-pattern is easy pattern matching and segment extraction for urls, domains, filepaths and any string composed of segments joined by a separator character","keywords":["url","pattern","matching","routing","route","regex","match","segment","path","domain","separator"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"},{"name":"Michael Trotter","url":"https://github.com/spicydonuts"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.10.0"},"dependencies":{},"devDependencies":{"nodeunit":"0.9.1","coffee-script":"1.9.1"},"main":"lib/url-pattern","scripts":{"compile":"node_modules/coffee-script/bin/coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"node_modules/nodeunit/bin/nodeunit test/*.coffee"},"gitHead":"132e4f910c4e1b81cdd79396da549749cec7074a","_id":"url-pattern@0.7.1","_shasum":"b251b549a01de97ac2a128b0a948cbf9b2691176","_from":".","_npmVersion":"2.4.1","_nodeVersion":"1.1.0","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"b251b549a01de97ac2a128b0a948cbf9b2691176","size":6331,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.7.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.7.1.tgz"},"directories":{},"publish_time":1428772089186,"_cnpm_publish_time":1428772089186,"_hasShrinkwrap":false},"0.7.0":{"name":"url-pattern","version":"0.7.0","description":"url-pattern is easy pattern matching and segment extraction for urls, domains, filepaths and any string composed of segments joined by a separator character","keywords":["url","pattern","matching","routing","route","regex","match","segment","path","domain","separator"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.10.0"},"dependencies":{},"devDependencies":{"nodeunit":"0.9.1","coffee-script":"1.9.1"},"main":"lib/url-pattern","scripts":{"compile":"node_modules/coffee-script/bin/coffee --bare --compile --output lib src","prepublish":"npm run compile","pretest":"npm run compile","test":"node_modules/nodeunit/bin/nodeunit test/*.coffee"},"gitHead":"97c5e86de6888345a0f572b87f479bba2c8022f3","_id":"url-pattern@0.7.0","_shasum":"8a377f67fd2f13817356492255f12df3c9f26ab8","_from":".","_npmVersion":"2.4.1","_nodeVersion":"1.1.0","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"dist":{"shasum":"8a377f67fd2f13817356492255f12df3c9f26ab8","size":5758,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.7.0.tgz"},"directories":{},"publish_time":1427067828317,"_cnpm_publish_time":1427067828317,"_hasShrinkwrap":false},"0.6.0":{"name":"url-pattern","version":"0.6.0","description":"url-pattern is easy pattern matching and segment extraction for urls, domains, filepaths and any string composed of segments joined by a separator character","keywords":["url","pattern","matching","routing","route","regex","match","segment","path","domain","separator"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"},{"name":"Samuel Reed","url":"https://github.com/STRML"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{},"devDependencies":{"nodeunit":"0.8.6","coffee-script":"1.7.1"},"main":"src/url-pattern","scripts":{"prepublish":"coffee --bare --compile --output src src/*.coffee","pretest":"coffee --bare --compile --output src src/*.coffee && coffee --bare --compile --output test test/*.coffee","test":"node_modules/nodeunit/bin/nodeunit test/*.js"},"_id":"url-pattern@0.6.0","dist":{"shasum":"81b94ebe2b821840e7cdf03c95a8fd8e18ee8bba","size":5424,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.6.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1399634753195,"_cnpm_publish_time":1399634753195,"_hasShrinkwrap":false},"0.5.0":{"name":"url-pattern","version":"0.5.0","description":"url-pattern is easy pattern matching and segment extraction for urls, domains, filepaths and any string composed of segments joined by a seperator character","keywords":["url","pattern","matching","routing","route","regex","match","segment","path","domain","separator"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{},"devDependencies":{"nodeunit":"0.8.6","coffee-script":"1.7.1"},"main":"src/url-pattern","scripts":{"prepublish":"coffee --bare --compile --output src src/*.coffee","postpublish":"rm src/*.js","pretest":"coffee --bare --compile --output src src/*.coffee && coffee --bare --compile --output test test/*.coffee","posttest":"rm src/*.js && rm test/*.js","test":"node_modules/nodeunit/bin/nodeunit test/*.js"},"_id":"url-pattern@0.5.0","dist":{"shasum":"dbcacdc53c0a1c7ced60b5c2108261cc5c881f58","size":5065,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.5.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1394541921137,"_cnpm_publish_time":1394541921137,"_hasShrinkwrap":false},"0.4.0":{"name":"url-pattern","version":"0.4.0","description":"url-pattern matches urls with patterns and extracts named url segments","keywords":["url","pattern","matching","routing","route","regex","match"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"contributors":[{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"https://github.com/andreypopp"}],"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{},"devDependencies":{"nodeunit":"0.8.5","coffee-script":"1.7.1"},"main":"src/url-pattern","scripts":{"prepublish":"coffee --bare --compile --output src src/*.coffee","postpublish":"rm src/*.js","pretest":"coffee --bare --compile --output src src/*.coffee && coffee --bare --compile --output test test/*.coffee","posttest":"rm src/*.js && rm test/*.js","test":"node_modules/nodeunit/bin/nodeunit test/*.js"},"_id":"url-pattern@0.4.0","dist":{"shasum":"f606dcaaee2151e9833a287995e0cadc24b5f455","size":4165,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.4.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1392840882092,"_cnpm_publish_time":1392840882092,"_hasShrinkwrap":false},"0.3.1":{"name":"url-pattern","version":"0.3.1","description":"url-pattern matches urls with patterns and extracts named url segments","keywords":["url","pattern","matching","routing","route","regex","match"],"homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{},"devDependencies":{"nodeunit":"0.8.4","coffee-script":"1.7.1"},"main":"src/url-pattern","scripts":{"prepublish":"coffee --bare --compile --output src src/*.coffee","postpublish":"rm src/*.js","pretest":"coffee --bare --compile --output src src/*.coffee && coffee --bare --compile --output test test/*.coffee","posttest":"rm src/*.js && rm test/*.js","test":"node_modules/nodeunit/bin/nodeunit test/*.js"},"_id":"url-pattern@0.3.1","dist":{"shasum":"171e4dde3495444f8cf790d77dcd06c509227e15","size":3538,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.3.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1391210453298,"_cnpm_publish_time":1391210453298,"_hasShrinkwrap":false},"0.2.2":{"name":"url-pattern","version":"0.2.2","description":"url-pattern matches urls with patterns and extracts named url segments","homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{},"devDependencies":{"nodeunit":"0.7.4","coffee-script":"1.4.0"},"main":"lib/url-pattern","scripts":{"prepublish":"coffee --bare --compile --lint --output lib src/*.coffee","postpublish":"rm -rf lib","test":"nodeunit test.coffee"},"readmeFilename":"README.md","_id":"url-pattern@0.2.2","dist":{"shasum":"4319a91f03e4179151d126dda288ed01ab4e025a","size":3401,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"snd","email":"kruemaxi@googlemail.com"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1385319228681,"_cnpm_publish_time":1385319228681,"_hasShrinkwrap":false},"0.2.1":{"name":"url-pattern","version":"0.2.1","description":"url-pattern matches urls with patterns and extracts named url segments","homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{"coffee-script":"1.4.0"},"devDependencies":{"nodeunit":"0.7.4"},"main":"lib/url-pattern","scripts":{"prepublish":"coffee --bare --compile --lint --output lib src/*.coffee","postpublish":"rm -rf lib","test":"nodeunit test.coffee"},"_id":"url-pattern@0.2.1","dist":{"shasum":"2aa34429a9040c7abe8cfef78137bf693027b768","size":3394,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.2.1.tgz"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1369142952056,"_cnpm_publish_time":1369142952056,"_hasShrinkwrap":false},"0.2.0":{"name":"url-pattern","version":"0.2.0","description":"url-pattern matches urls with patterns and extracts named url segments","homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{"coffee-script":"1.4.0"},"devDependencies":{"nodeunit":"0.7.4"},"_id":"url-pattern@0.2.0","dist":{"shasum":"519e7f3302c694c3af6c8adbac27a504e5ee9d8e","size":2848,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.2.0.tgz"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1354723073914,"_cnpm_publish_time":1354723073914,"_hasShrinkwrap":false},"0.1.0":{"name":"url-pattern","version":"0.1.0","description":"url-pattern matches urls with patterns and extracts named url segments","homepage":"http://github.com/snd/url-pattern","author":{"name":"Maximilian Krüger","email":"kruemaxi@gmail.com","url":"http://github.com/snd"},"bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"repository":{"type":"git","url":"git://github.com/snd/url-pattern.git"},"licenses":{"type":"MIT","url":"git://github.com/snd/url-pattern/LICENSE"},"engines":{"node":">=0.8.5"},"dependencies":{"coffee-script":"1.4.0","underscore":"1.4.2"},"devDependencies":{"nodeunit":"0.7.4"},"_id":"url-pattern@0.1.0","dist":{"shasum":"363adbc664f92c5a7f13b260e4632d26ed540260","size":2845,"noattachment":false,"key":"/url-pattern/-/url-pattern-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/url-pattern/download/url-pattern-0.1.0.tgz"},"maintainers":[{"name":"snd","email":"kruemaxi@googlemail.com"}],"directories":{},"publish_time":1354634136405,"_cnpm_publish_time":1354634136405,"_hasShrinkwrap":false}},"readme":"# url-pattern\n\n[![NPM Package](https://img.shields.io/npm/v/url-pattern.svg?style=flat)](https://www.npmjs.org/package/url-pattern)\n[![Build Status](https://travis-ci.org/snd/url-pattern.svg?branch=master)](https://travis-ci.org/snd/url-pattern/branches)\n[![Sauce Test Status](https://saucelabs.com/buildstatus/urlpattern)](https://saucelabs.com/u/urlpattern)\n[![codecov.io](http://codecov.io/github/snd/url-pattern/coverage.svg?branch=master)](http://codecov.io/github/snd/url-pattern?branch=master)\n[![Downloads per Month](https://img.shields.io/npm/dm/url-pattern.svg?style=flat)](https://www.npmjs.org/package/url-pattern)\n\n**easier than regex string matching patterns for urls and other strings.  \nturn strings into data or data into strings.**\n\n> This is a great little library -- thanks!  \n> [michael](https://github.com/snd/url-pattern/pull/7)\n\n[make pattern:](#make-pattern-from-string)\n``` javascript\nvar pattern = new UrlPattern('/api/users(/:id)');\n```\n\n[match pattern against string and extract values:](#match-pattern-against-string)\n``` javascript\npattern.match('/api/users/10'); // {id: '10'}\npattern.match('/api/users'); // {}\npattern.match('/api/products/5'); // null\n```\n\n[generate string from pattern and values:](#stringify-patterns)\n``` javascript\npattern.stringify() // '/api/users'\npattern.stringify({id: 20}) // '/api/users/20'\n```\n\n- continuously tested in Node.js (0.12, 4.2.3 and 5.3) and all relevant browsers:\n  [![Sauce Test Status](https://saucelabs.com/browser-matrix/urlpattern.svg)](https://saucelabs.com/u/urlpattern)\n- [tiny single file with just under 500 lines of simple, readable, maintainable code](src/url-pattern.coffee)\n- [huge test suite](test)\n  passing [![Build Status](https://travis-ci.org/snd/url-pattern.svg?branch=master)](https://travis-ci.org/snd/url-pattern/branches)\n  with [![codecov.io](http://codecov.io/github/snd/url-pattern/coverage.svg?branch=master)](http://codecov.io/github/snd/url-pattern?branch=master)\n  code coverage\n- widely used [![Downloads per Month](https://img.shields.io/npm/dm/url-pattern.svg?style=flat)](https://www.npmjs.org/package/url-pattern)\n- supports CommonJS, [AMD](http://requirejs.org/docs/whyamd.html) and browser globals\n  - `require('url-pattern')`\n  - use [lib/url-pattern.js](lib/url-pattern.js) in the browser\n  - sets the global variable `UrlPattern` when neither CommonJS nor [AMD](http://requirejs.org/docs/whyamd.html) are available.\n- very fast matching as each pattern is compiled into a regex exactly once\n- zero dependencies\n- [customizable](#customize-the-pattern-syntax)\n- [frequently asked questions](#frequently-asked-questions)\n- npm package: `npm install url-pattern`\n- bower package: `bower install url-pattern`\n- pattern parser implemented using simple, combosable, testable [parser combinators](https://en.wikipedia.org/wiki/Parser_combinator)\n- [typescript typings](index.d.ts)\n\n[check out **passage** if you are looking for simple composable routing that builds on top of url-pattern](https://github.com/snd/passage)\n\n```\nnpm install url-pattern\n```\n\n```\nbower install url-pattern\n```\n\n```javascript\n> var UrlPattern = require('url-pattern');\n```\n\n``` javascript\n> var pattern = new UrlPattern('/v:major(.:minor)/*');\n\n> pattern.match('/v1.2/');\n{major: '1', minor: '2', _: ''}\n\n> pattern.match('/v2/users');\n{major: '2', _: 'users'}\n\n> pattern.match('/v/');\nnull\n```\n``` javascript\n> var pattern = new UrlPattern('(http(s)\\\\://)(:subdomain.):domain.:tld(\\\\::port)(/*)')\n\n> pattern.match('google.de');\n{domain: 'google', tld: 'de'}\n\n> pattern.match('https://www.google.com');\n{subdomain: 'www', domain: 'google', tld: 'com'}\n\n> pattern.match('http://mail.google.com/mail');\n{subdomain: 'mail', domain: 'google', tld: 'com', _: 'mail'}\n\n> pattern.match('http://mail.google.com:80/mail');\n{subdomain: 'mail', domain: 'google', tld: 'com', port: '80', _: 'mail'}\n\n> pattern.match('google');\nnull\n```\n\n## make pattern from string\n\n```javascript\n> var pattern = new UrlPattern('/api/users/:id');\n```\n\na `pattern` is immutable after construction.  \nnone of its methods changes its state.  \nthat makes it easier to reason about.\n\n## match pattern against string\n\nmatch returns the extracted segments:\n\n```javascript\n> pattern.match('/api/users/10');\n{id: '10'}\n```\n\nor `null` if there was no match:\n\n``` javascript\n> pattern.match('/api/products/5');\nnull\n```\n\npatterns are compiled into regexes which makes `.match()` superfast.\n\n## named segments\n\n`:id` (in the example above) is a named segment:\n\na named segment starts with `:` followed by the **name**.  \nthe **name** must be at least one character in the regex character set `a-zA-Z0-9`.\n\nwhen matching, a named segment consumes all characters in the regex character set\n`a-zA-Z0-9-_~ %`.\na named segment match stops at `/`, `.`, ... but not at `_`, `-`, ` `, `%`...\n\n[you can change these character sets. click here to see how.](#customize-the-pattern-syntax)\n\nif a named segment **name** occurs more than once in the pattern string,\nthen the multiple results are stored in an array on the returned object:\n\n```javascript\n> var pattern = new UrlPattern('/api/users/:ids/posts/:ids');\n> pattern.match('/api/users/10/posts/5');\n{ids: ['10', '5']}\n```\n\n## optional segments, wildcards and escaping\n\nto make part of a pattern optional just wrap it in `(` and `)`:\n\n```javascript\n> var pattern = new UrlPattern(\n  '(http(s)\\\\://)(:subdomain.):domain.:tld(/*)'\n);\n```\n\nnote that `\\\\` escapes the `:` in `http(s)\\\\://`.\nyou can use `\\\\` to escape `(`, `)`, `:` and `*` which have special meaning within\nurl-pattern.\n\noptional named segments are stored in the corresponding property only if they are present in the source string:\n\n```javascript\n> pattern.match('google.de');\n{domain: 'google', tld: 'de'}\n```\n\n```javascript\n> pattern.match('https://www.google.com');\n{subdomain: 'www', domain: 'google', tld: 'com'}\n```\n\n`*` in patterns are wildcards and match anything.\nwildcard matches are collected in the `_` property:\n\n```javascript\n> pattern.match('http://mail.google.com/mail');\n{subdomain: 'mail', domain: 'google', tld: 'com', _: 'mail'}\n```\n\nif there is only one wildcard then `_` contains the matching string.\notherwise `_` contains an array of matching strings.\n\n[look at the tests for additional examples of `.match`](test/match-fixtures.coffee)\n\n## make pattern from regex\n\n```javascript\n> var pattern = new UrlPattern(/^\\/api\\/(.*)$/);\n```\n\nif the pattern was created from a regex an array of the captured groups is returned on a match:\n\n```javascript\n> pattern.match('/api/users');\n['users']\n\n> pattern.match('/apiii/test');\nnull\n```\n\nwhen making a pattern from a regex\nyou can pass an array of keys as the second argument.\nreturns objects on match with each key mapped to a captured value:\n\n```javascript\n> var pattern = new UrlPattern(\n  /^\\/api\\/([^\\/]+)(?:\\/(\\d+))?$/,\n  ['resource', 'id']\n);\n\n> pattern.match('/api/users');\n{resource: 'users'}\n\n> pattern.match('/api/users/5');\n{resource: 'users', id: '5'}\n\n> pattern.match('/api/users/foo');\nnull\n```\n\n## stringify patterns\n\n```javascript\n> var pattern = new UrlPattern('/api/users/:id');\n\n> pattern.stringify({id: 10})\n'/api/users/10'\n```\n\noptional segments are only included in the output if they contain named segments\nand/or wildcards and values for those are provided:\n\n```javascript\n> var pattern = new UrlPattern('/api/users(/:id)');\n\n> pattern.stringify()\n'/api/users'\n\n> pattern.stringify({id: 10})\n'/api/users/10'\n```\n\nwildcards (key = `_`), deeply nested optional groups and multiple value arrays should stringify as expected.\n\nan error is thrown if a value that is not in an optional group is not provided.\n\nan error is thrown if an optional segment contains multiple\nparams and not all of them are provided.\n*one provided value for an optional segment\nmakes all values in that optional segment required.*\n\n[look at the tests for additional examples of `.stringify`](test/stringify-fixtures.coffee)\n\n## customize the pattern syntax\n\nfinally we can completely change pattern-parsing and regex-compilation to suit our needs:\n\n```javascript\n> var options = {};\n```\n\nlet's change the char used for escaping (default `\\\\`):\n\n```javascript\n> options.escapeChar = '!';\n```\n\nlet's change the char used to start a named segment (default `:`):\n\n```javascript\n> options.segmentNameStartChar = '$';\n```\n\nlet's change the set of chars allowed in named segment names (default `a-zA-Z0-9`)\nto also include `_` and `-`:\n\n```javascript\n> options.segmentNameCharset = 'a-zA-Z0-9_-';\n```\n\nlet's change the set of chars allowed in named segment values\n(default `a-zA-Z0-9-_~ %`) to not allow non-alphanumeric chars:\n\n```javascript\n> options.segmentValueCharset = 'a-zA-Z0-9';\n```\n\nlet's change the chars used to surround an optional segment (default `(` and `)`):\n\n```javascript\n> options.optionalSegmentStartChar = '[';\n> options.optionalSegmentEndChar = ']';\n```\n\nlet's change the char used to denote a wildcard (default `*`):\n\n```javascript\n> options.wildcardChar = '?';\n```\n\npass options as the second argument to the constructor:\n\n```javascript\n> var pattern = new UrlPattern(\n  '[http[s]!://][$sub_domain.]$domain.$toplevel-domain[/?]',\n  options\n);\n```\n\nthen match:\n\n```javascript\n> pattern.match('http://mail.google.com/mail');\n{\n  sub_domain: 'mail',\n  domain: 'google',\n  'toplevel-domain': 'com',\n  _: 'mail'\n}\n```\n\n## frequently asked questions\n\n### how do i match the query part of an URL ?\n\nthe query part of an URL has very different semantics than the rest.\nurl-pattern is not well suited for parsing the query part.\n\nthere are good existing libraries for parsing the query part of an URL.\nhttps://github.com/hapijs/qs is an example.\nin the interest of keeping things simple and focused\ni see no reason to add special support\nfor parsing the query part to url-pattern.\n\ni recommend splitting the URL at `?`, using url-pattern\nto parse the first part (scheme, host, port, path)\nand using https://github.com/hapijs/qs to parse the last part (query).\n\n### how do i match an IP ?\n\nyou can't exactly match IPs with url-pattern so you have to\nfall back to regexes and pass in a regex object.\n\n[here's how you do it](https://github.com/snd/url-pattern/blob/c8e0a943bb62e6feeca2d2595da4e22782e617ed/test/match-fixtures.coffee#L237)\n\n## [contributing](contributing.md)\n\n## [license: MIT](LICENSE)\n","_attachments":{},"homepage":"http://github.com/snd/url-pattern","bugs":{"url":"http://github.com/snd/url-pattern/issues","email":"kruemaxi@gmail.com"},"license":"MIT"}