{"_id":"routington","_rev":"407812","name":"routington","description":"Trie-based URL Routing","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"time":{"modified":"2021-08-04T04:55:59.000Z","created":"2013-04-17T22:38:14.763Z","1.0.3":"2014-12-27T22:13:14.269Z","1.0.2":"2014-09-22T00:48:05.623Z","1.0.1":"2014-09-10T06:05:49.145Z","1.0.0":"2014-07-23T06:13:49.074Z","0.1.3":"2014-03-06T09:40:24.392Z","0.1.2":"2014-02-12T20:42:09.504Z","0.1.1":"2013-12-28T10:48:21.145Z","0.1.0":"2013-12-28T10:43:50.148Z","0.0.11":"2013-11-15T07:35:27.317Z","0.0.10":"2013-07-13T22:41:34.179Z","0.0.9":"2013-07-05T07:12:10.458Z","0.0.8":"2013-07-01T23:02:51.885Z","0.0.7":"2013-06-28T18:41:46.990Z","0.0.6":"2013-05-20T23:11:14.459Z","0.0.5":"2013-05-03T20:51:10.725Z","0.0.4":"2013-05-03T04:53:39.532Z","0.0.3":"2013-05-02T05:55:47.339Z","0.0.2":"2013-05-02T02:46:04.165Z","0.0.1":"2013-04-17T22:38:14.763Z"},"users":{"kehanshi":true},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/pillarjs/routington"},"versions":{"1.0.3":{"name":"routington","description":"Trie-based URL Routing","version":"1.0.3","dependencies":{"flatten":"~0.0.1","http-assert":"1"},"devDependencies":{"mocha":"1","should":"4","matcha":"0","istanbul":"0"},"scripts":{"bench":"matcha benchmark","test":"mocha --reporter spec --require should","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/pillarjs/routington"},"license":"MIT","main":"lib","files":["lib"],"keywords":["router","routes","routing","trie"],"gitHead":"db9f59bf21cb2a5f2f9cb8e3215edbf4654d0faa","bugs":{"url":"https://github.com/pillarjs/routington/issues"},"homepage":"https://github.com/pillarjs/routington","_id":"routington@1.0.3","_shasum":"bd54cbf99bfa6bc9309312e38d5ea140ee0f421c","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.11.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"dist":{"shasum":"bd54cbf99bfa6bc9309312e38d5ea140ee0f421c","size":5270,"noattachment":false,"key":"/routington/-/routington-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-1.0.3.tgz"},"directories":{},"publish_time":1419718394269,"_cnpm_publish_time":1419718394269,"_hasShrinkwrap":false},"1.0.2":{"name":"routington","description":"Trie-based URL Routing","version":"1.0.2","dependencies":{"flatten":"~0.0.1","http-assert":"^1.0.2"},"devDependencies":{"mocha":"1","should":"4","matcha":"0","istanbul":"0"},"scripts":{"bench":"matcha benchmark","test":"mocha --reporter spec --require should","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/pillarjs/routington"},"license":"MIT","main":"lib","files":["lib"],"keywords":["router","routes","routing","trie"],"gitHead":"e1d05f9d1ad5376ad7f1ec43eb56493ef7d2af6f","bugs":{"url":"https://github.com/pillarjs/routington/issues"},"homepage":"https://github.com/pillarjs/routington","_id":"routington@1.0.2","_shasum":"678e296811c5c34dcaf056086f4f4c1442b2f2d4","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.11.13","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"dist":{"shasum":"678e296811c5c34dcaf056086f4f4c1442b2f2d4","size":4614,"noattachment":false,"key":"/routington/-/routington-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-1.0.2.tgz"},"directories":{},"publish_time":1411346885623,"_cnpm_publish_time":1411346885623,"_hasShrinkwrap":false},"1.0.1":{"name":"routington","description":"Trie-based URL Routing","version":"1.0.1","dependencies":{"http-errors":"~1.2.0","flatten":"~0.0.1"},"devDependencies":{"mocha":"1","should":"4","matcha":"0","istanbul":"0"},"scripts":{"bench":"matcha benchmark","test":"mocha --reporter spec --require should","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/pillarjs/routington"},"license":"MIT","main":"lib","files":["lib"],"keywords":["router","routes","routing","trie"],"gitHead":"754ffa479641e706ac2e9962956812dae5465724","bugs":{"url":"https://github.com/pillarjs/routington/issues"},"homepage":"https://github.com/pillarjs/routington","_id":"routington@1.0.1","_shasum":"f4ebe5a05dd6cbcb75da01af59e8b1f475a65d13","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"dist":{"shasum":"f4ebe5a05dd6cbcb75da01af59e8b1f475a65d13","size":4613,"noattachment":false,"key":"/routington/-/routington-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-1.0.1.tgz"},"directories":{},"publish_time":1410329149145,"_cnpm_publish_time":1410329149145,"_hasShrinkwrap":false},"1.0.0":{"name":"routington","description":"Trie-based URL Routing","version":"1.0.0","dependencies":{"flatten":"0"},"devDependencies":{"mocha":"1","should":"4","matcha":"0","istanbul":"0"},"scripts":{"bench":"matcha benchmark","test":"mocha --reporter spec --require should","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/routington"},"license":"MIT","main":"lib","files":["lib"],"keywords":["router","routes","routing","trie"],"gitHead":"08c7518caf831f10c667e91e978c5103349bfd7f","bugs":{"url":"https://github.com/jonathanong/routington/issues"},"homepage":"https://github.com/jonathanong/routington","_id":"routington@1.0.0","_shasum":"376ea8490d966177e12bdda1639b0e14f670d364","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"dist":{"shasum":"376ea8490d966177e12bdda1639b0e14f670d364","size":4469,"noattachment":false,"key":"/routington/-/routington-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-1.0.0.tgz"},"directories":{},"publish_time":1406096029074,"_cnpm_publish_time":1406096029074,"_hasShrinkwrap":false},"0.1.3":{"name":"routington","description":"Trie-based URL Routing","version":"0.1.3","devDependencies":{"mocha":"*","should":"*","matcha":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/routington.git"},"bugs":{"url":"https://github.com/jonathanong/routington/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/jonathanong/routington","_id":"routington@0.1.3","dist":{"shasum":"27bda10ffe4d27c4d3c545e4268b9b79105fc20c","size":5391,"noattachment":false,"key":"/routington/-/routington-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.1.3.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1394098824392,"_cnpm_publish_time":1394098824392,"_hasShrinkwrap":false},"0.1.2":{"name":"routington","description":"Trie-based URL Routing","version":"0.1.2","devDependencies":{"mocha":"*","should":"*","matcha":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/routington.git"},"bugs":{"url":"https://github.com/jonathanong/routington/issues","email":"me@jongleberry.com"},"license":"MIT","homepage":"https://github.com/jonathanong/routington","_id":"routington@0.1.2","dist":{"shasum":"92afd9d7689d760761732d2f252de0a96542126d","size":5408,"noattachment":false,"key":"/routington/-/routington-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1392237729504,"_cnpm_publish_time":1392237729504,"_hasShrinkwrap":false},"0.1.1":{"name":"routington","description":"Trie-based URL Routing","version":"0.1.1","devDependencies":{"mocha":"*","should":"*","matcha":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/routington.git"},"bugs":{"url":"https://github.com/jonathanong/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/jonathanong/routington","_id":"routington@0.1.1","dist":{"shasum":"21ca7870289a4a6b03b5021bb0ce0832725acedc","size":5268,"noattachment":false,"key":"/routington/-/routington-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1388227701145,"_cnpm_publish_time":1388227701145,"_hasShrinkwrap":false},"0.1.0":{"name":"routington","description":"Trie-based URL Routing","version":"0.1.0","devDependencies":{"mocha":"*","should":"*","matcha":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/routington.git"},"bugs":{"url":"https://github.com/jonathanong/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/jonathanong/routington","_id":"routington@0.1.0","dist":{"shasum":"6b61033a36256c1c2eca5db616bf8639366c4ebf","size":5321,"noattachment":false,"key":"/routington/-/routington-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1388227430148,"_cnpm_publish_time":1388227430148,"_hasShrinkwrap":false},"0.0.11":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.11","devDependencies":{"mocha":"*","should":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/berrington/routington","_id":"routington@0.0.11","dist":{"shasum":"d3afd00f9104bc2c5fab25a1c7e95a4141c5d80c","size":4439,"noattachment":false,"key":"/routington/-/routington-0.0.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.11.tgz"},"_from":".","_npmVersion":"1.3.13","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1384500927317,"_cnpm_publish_time":1384500927317,"_hasShrinkwrap":false},"0.0.10":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.10","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"routington@0.0.10","dist":{"shasum":"a14600fc10fa496cd71afae9efdc5ef52e2d9940","size":6531,"noattachment":false,"key":"/routington/-/routington-0.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.10.tgz"},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1373755294179,"_cnpm_publish_time":1373755294179,"_hasShrinkwrap":false},"0.0.9":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.9","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"routington@0.0.9","dist":{"shasum":"f31ed974a930a442bab305c8de589dd95b65b98e","size":6620,"noattachment":false,"key":"/routington/-/routington-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.9.tgz"},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1373008330458,"_cnpm_publish_time":1373008330458,"_hasShrinkwrap":false},"0.0.8":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.8","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"routington@0.0.8","dist":{"shasum":"8e5f2f3b962d921f694c54489da90708520891d9","size":6653,"noattachment":false,"key":"/routington/-/routington-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.8.tgz"},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1372719771885,"_cnpm_publish_time":1372719771885,"_hasShrinkwrap":false},"0.0.7":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.7","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"routington@0.0.7","dist":{"shasum":"d3717486bf1abb0bd957410cb1764f2dfa15eb1b","size":6655,"noattachment":false,"key":"/routington/-/routington-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.7.tgz"},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1372444906990,"_cnpm_publish_time":1372444906990,"_hasShrinkwrap":false},"0.0.6":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.6","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"routington@0.0.6","dist":{"shasum":"48e65b32e9d4df9fdda1f2421ee3d161d30d8cbf","size":6552,"noattachment":false,"key":"/routington/-/routington-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1369091474459,"_cnpm_publish_time":1369091474459,"_hasShrinkwrap":false},"0.0.5":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.5","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"WTFPL","readmeFilename":"README.md","_id":"routington@0.0.5","dist":{"shasum":"ece974923dd1d249c187f10c7bc2f6464fc4cc93","size":5949,"noattachment":false,"key":"/routington/-/routington-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.5.tgz"},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1367614270725,"_cnpm_publish_time":1367614270725,"_hasShrinkwrap":false},"0.0.4":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.4","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"WTFPL","readmeFilename":"README.md","_id":"routington@0.0.4","dist":{"shasum":"a0a70e2609a3e31d935e6fcc25a0c2ba5a30488d","size":9694,"noattachment":false,"key":"/routington/-/routington-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.4.tgz"},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1367556819532,"_cnpm_publish_time":1367556819532,"_hasShrinkwrap":false},"0.0.3":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.3","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"WTFPL","readmeFilename":"README.md","_id":"routington@0.0.3","dist":{"shasum":"3b751e21bb6c72cd76aac683e6bf6ca63fcc009f","size":11040,"noattachment":false,"key":"/routington/-/routington-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.3.tgz"},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1367474147339,"_cnpm_publish_time":1367474147339,"_hasShrinkwrap":false},"0.0.2":{"name":"routington","description":"Trie-based URL Routing","version":"0.0.2","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/berrington/routington.git"},"bugs":{"url":"https://github.com/berrington/routington/issues","email":"me@jongleberry.com"},"license":"WTFPL","readmeFilename":"README.md","_id":"routington@0.0.2","dist":{"shasum":"83487d65de3fbab987204478082e69f682e50062","size":11007,"noattachment":false,"key":"/routington/-/routington-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1367462764165,"_cnpm_publish_time":1367462764165,"_hasShrinkwrap":false},"0.0.1":{"name":"routington","description":"Prefix tree-based URL routing","version":"0.0.1","devDependencies":{"mocha":"*","should":"*","component":"*"},"scripts":{"test":"make test"},"readmeFilename":"README.md","_id":"routington@0.0.1","dist":{"shasum":"123367db89af1a83f54798291be939008cf22902","size":4318,"noattachment":false,"key":"/routington/-/routington-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/routington/download/routington-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"}],"directories":{},"publish_time":1366238294763,"_cnpm_publish_time":1366238294763,"_hasShrinkwrap":false}},"readme":"## Routington\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n[![Gittip][gittip-image]][gittip-url]\n\nRoutington is a [trie](http://en.wikipedia.org/wiki/Trie)-based URL router.\nIts goal is only to define and match URLs.\nIt does not handle methods, headers, controllers, views, etc., in anyway.\nIt is faster than traditional, linear, regular expression-matching routers, although insignficantly,\nand scales with the number of routes.\n\nThe purpose of this router isn't for performance,\nbut to bring more structure to URL routing.\nThe intention is for you to build a framework on top either in node.js or in the browser.\n\nImplementations:\n\n  - [koa-trie-router](https://github.com/koajs/trie-router) - for [koa](https://github.com/koajs)\n  - [wayfarer](https://github.com/yoshuawuyts/wayfarer)\n\n### API\n\n#### node Node = Routington()\n\n```js\nvar routington = require('routington')\nvar router = routington()\n```\n\n`router` is the root `Node` in the trie. All `node`s will have `router` as furthest ancestor.\n\n#### Node\n\nEvery node on a tree is an instance of `Node`. You only construct the root. A `node` has the following properties:\n\n- `child {}Node` - String based child definitions.\n  For example, `node.child['post']` will return a child node with `node.string === 'post'`\n- `children []Node` - Name/regex based child definitions\n- `parent Node` - The parent of the node\n- `name` - Name of the node (for parameter matching)\n- `string` - String to match the URL fragment\n- `regex` - Regular expression to match the URL fragment\n\n#### nodes []Node = router.define(route)\n\n```js\nvar nodes = router.define('/:identity(page|petition)/:id([0-9a-f]{24})')\n```\n\n- `route` is a definition of a route and is an extension of Express' routing syntax.\n  `route`, however, can only be a string.\n- `nodes` is an array of `node`s.\n\nEach fragment of the route, delimited by a `/`, can have the following signature:\n\n- `string` - ex `/post`\n- `string|string` - `|` separated strings, ex `/post|page`\n- `:name` - Wildcard route matched to a name\n- `(regex)` - A regular expression match without saving the parameter (not recommended)\n- `:name(regex)`- Named regular expression match\n\nYou should always name your regular expressions otherwise you can't use the captured value.\nThe regular expression is built using `new RegExp('^(' + regex + ')$', 'i')`,\nso you need to escape your string, ie `\\\\w`.\nYou can always pre-define names or regular expressions before. For example, I can define:\n\n```js\nrouter.define('/page/:id(\\\\w{3,30})')\n\n// later, :id will have the same regexp\n// so you don't have to repeat yourself\nrouter.define('/page/:id/things')\n```\n\n#### match {} = router.match(url)\n\n```js\nrouter.define('/page/:id(\\\\w{3,30})')\nvar match = router.match('/page/taylorswift')\n```\n\n`match`, unless `null`, will be an object with the following properties:\n\n- `param` - A list of named parameters, ex, `match.param.id === 'taylorswift'`.\n- `node` - The matched node.\n  Will always have `name.string === ''`.\n\n### Building a Router on top of Routington\n\nEach URL you define creates a node,\nand you are free to do whatever you'd like with each node as long you don't overwrite any prototype properties (basically just `define`, `match`, and `parse`).\nAdding any features to routington shouldn't be necessary.\n\nFor example, suppose you want to attach callbacks to a node by extending routington:\n\n```js\nrouter.get('/:id/:controller', function (req, res, next) {\n  console.log('do something')\n})\n```\n\nYou can attach the middleware to a `node.GET` array:\n\n```js\nrouter.get = function (path, handler) {\n  var node = router.define(path)[0]\n  node.GET = node.GET || []\n  node.GET.push(handler)\n}\n```\n\nNow, dispatching is easy:\n\n```js\nfunction dispatcher(req, res, next) {\n  var match = router.match(url.parse(req.url).pathname)\n  if (!match)\n    // this is a 404\n\n  var node = match.node\n  var callbacks = node[req.method]\n  if (!callbacks)\n    // this is a 405\n\n  // execute all the callbacks.\n  // async.series won't actually work here,\n  // but you get the point.\n  async.series(callbacks, next)\n}\n```\n\nProperties attached to the node will be exposed on the match.\nFor example,\nsuppose you wanted to label a node:\n\n```js\nvar node = router.define('/:id/:controller')[0]\nnode.label = 'controller'\n```\n\nWhen matched, it will be available via `match.node.label`:\n\n```js\nvar match = router.match('/someid/somecontroller')\nassert(match.node.label === 'label')\n```\n\nSince reaching into `match.node` is a little inconvenient and you probably don't want your end users to touch it,\nyou should expose in your dispatcher:\n\n```js\nvar match = router.match(url.parse(req.url).pathname)\n\n// ...\n\nreq.param = match.param\nreq.label = match.node.label\n```\n\n### Browser Support\n\nIE9+\n\n[npm-image]: https://img.shields.io/npm/v/routington.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/routington\n[github-tag]: http://img.shields.io/github/tag/pillarjs/routington.svg?style=flat-square\n[github-url]: https://github.com/pillarjs/routington/tags\n[travis-image]: https://img.shields.io/travis/pillarjs/routington.svg?style=flat-square\n[travis-url]: https://travis-ci.org/pillarjs/routington\n[coveralls-image]: https://img.shields.io/coveralls/pillarjs/routington.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/pillarjs/routington?branch=master\n[david-image]: http://img.shields.io/david/pillarjs/routington.svg?style=flat-square\n[david-url]: https://david-dm.org/pillarjs/routington\n[license-image]: http://img.shields.io/npm/l/routington.svg?style=flat-square\n[license-url]: LICENSE.md\n[downloads-image]: http://img.shields.io/npm/dm/routington.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/routington\n[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square\n[gittip-url]: https://www.gittip.com/jonathanong/\n","_attachments":{},"homepage":"https://github.com/pillarjs/routington","bugs":{"url":"https://github.com/pillarjs/routington/issues"},"license":"MIT"}