{"_id":"urltree","_rev":"26-5cb2460bb71b01990cfdc2f644afafff","name":"urltree","description":"Named URL data structure with support for URL building.","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URLs data structure and builder.","version":"0.1.0","main":"index.js","repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.1.0","dist":{"shasum":"68efd688ff279e97cb090ee96451a3dcdb7fbb47","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.1.0.tgz","integrity":"sha512-proGdVIR8SOB57TapVPn7T62YB5wylDd6Rv4e5+M3Brx0Hibv6I4DOa+1Eaw/CON45Cg4MKfNZBHyGRqXhANnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJijPSM9Fg+mo+pUXGNBMVt56rxUbL1s46TAn3/EQ2dAiA7vKt1dkIziNnn+t78Qyndsl4UFKgmuFvm9Zt5fvZW1Q=="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.1.1":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.1.1","main":"index.js","repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.1.1","dist":{"shasum":"23e754d1afeb269ee68f3bd7f2e8b5aacff847ee","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.1.1.tgz","integrity":"sha512-54L3YHCgnr9xy6neaexkCElzU1elko7DCVOyqhQeEXnvR+HjRCCFeQH5rJcuTbPZH9q6Xksa5CoyTkGlzJLDJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVhihALIOhV5gaiRSJWuBXm1FsUaNZNC6saFFbnSKbvAiEA8b2Zrv1hTTj7VnMl2SzDbAvu+h0y+nYgEEQTEz0jY3k="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.1.2":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.1.2","main":"index.js","repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.1.2","dist":{"shasum":"0ce2345bf39722905f1143c9865d412aca60f2b2","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.1.2.tgz","integrity":"sha512-kg21Ij52/1cCRdG7hhaPVe4Y0oGAUndhYbNC3Vm7REvKDM8OUVwbnxHHe8hKdWuYlyoXV2c3v0k88bbvZYt61A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqUxaonAX7CbBFEWra2bquipMbBILP9ZMpsVdDHOXOAwIgBwTqr6If3ask7tvf8qIHbAG1ShUOvTl8gzeTnjtq/n4="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.2.0":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.2.0","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.2.0","dist":{"shasum":"e068366f217986549065ccc3d67d46aef82c8bd1","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.2.0.tgz","integrity":"sha512-wRqHYj+7sAJiwjJm5Tuklv3qME5q+mRqAD3q619HWXv6xnUsipubRIS+EdmeYcLlE0w01xPwKqUpXeK/NtbXDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfRtJY0UU7lRBugXxSyak2p6tyaT3iCQ0grYoIltQiyAiAzcCGnUmtJGW14Mr8TwBeM0luh25+b3BB/K/52pnHfWw=="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.2.1":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.2.1","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.2.1","dist":{"shasum":"9aef147feeb87c881371dfcacb0d37cf6eeadf76","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.2.1.tgz","integrity":"sha512-RJWH8Z6hpPsSrYefnoN3ci3X0erH2moDb0ZB9aTZOFRWhDc2mAGEch2SZpTq+O8Sa4EUgKgC6fANabkSo4HgHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWSxnSOd0kxRC9FOc/4WO6lrDr32O6BmcY9XB9Y0AoUAIgR68cltcV5bXKHOpSp9KPq6szPGkrdotz5PgWzbMY3M8="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.2.2":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.2.2","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.2.2","dist":{"shasum":"65478d09eda3472334268448bb6cdb983adbbfbd","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.2.2.tgz","integrity":"sha512-Jd4qgvE2dgZOQ7BpHVmuVZPxDABxRMc3WYdVAKeSOvygGB8d6DgUxsJotYvc5zjGK+IIJ1kL2gzF9gndAqOTBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDL0Rmj/26fZTMBwOwug1IR3YMPIl08YqMvkqY0RoYx0wIgNRgwoqXU7WBVSIoJ6T9Nz/zIST44X/2zSqBG1j+D4Ls="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.2.3":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.2.3","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.2.3","dist":{"shasum":"fb81e8711de08ef802ec049ad41f68eb8edc0de9","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.2.3.tgz","integrity":"sha512-MrjYRLehBAxigV7zauqCPyrloDBkehqycaupH/LgcecOW2wE+44f3XrJefCVrSRQ46g8BiJvFwjVZOH0g24FEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICkMVt9wDJ+qn+TS+Ix8ZehC7K0yGa5/bsqoBuZG9ZU1AiEAjL4qe3M3JPQarTuBvPyp4IjiU/inKQr4omIlpJP8n10="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}]},"0.3.0":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.3.0","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"gitHead":"6ada7db0b0dd1fac4b71e9abf378f4597c146bed","bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.3.0","_shasum":"b7c3506e1df0b7350bf1266c19f964412505d708","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}],"dist":{"shasum":"b7c3506e1df0b7350bf1266c19f964412505d708","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.3.0.tgz","integrity":"sha512-j0/orkLDvzS5vFsDFg73gr/ecS8VUPEODaGrGYFHpo17I2aeE51YoKrUwsrkWKsax/iArRg4mfVYIbctHpMUYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUg44ba9Gah9nBkOWpjtsQq+zsRTXvDpYWm0dCXbjXhQIhAMeaavvYxd2U+S9pZLgUZGyeNIp3L2jsxTue6aceQHIw"}]}},"0.4.0":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.4.0","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"gitHead":"d7d1b70ec05cae303681ce9ae744a8fc379ba957","bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.4.0","_shasum":"c849a61087a18c2e730292349cac6b4b0967ec83","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}],"dist":{"shasum":"c849a61087a18c2e730292349cac6b4b0967ec83","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.4.0.tgz","integrity":"sha512-lwuCL3u0qonFACVe65btCn2NSyFGHSD8mCyZgZBuZGi7CFJUSnDRl81wGop73upoDgUd5xXmRyY2VQndArjGtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBr9ALRyLsOW7L3uTI75VnvkvVVeWMmdieuU7P+nlD0QIhAOXeVyTqB/5clsMc8aqBO1RNDULJOFEzIvbeYvwl3j/X"}]}},"0.5.0":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.5.0","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"gitHead":"fcf3c4c7fe1df84ba9b25c28678869566f82c3dc","bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.5.0","_shasum":"2bcfbb5169e5508478ce909d4fe8468536e82e2e","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}],"dist":{"shasum":"2bcfbb5169e5508478ce909d4fe8468536e82e2e","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.5.0.tgz","integrity":"sha512-KH2CSAN1dbF4Iv21Rqn41UBNFUI8vF2s+hbctua6XoZk3oF8SEWJdkxA2qVcg7brBT3JXFTRSSWzm4+vBEekYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDmF6Ah/Z6NQ4GqFgNoA4PtZGvRX9rLXQOt0yHjNdonfAiEAjOi0WlTT/xlXEraaYr2AykcQ7w/AtuScuw9Fr2ilRqA="}]}},"0.5.1":{"name":"urltree","author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"description":"Named URL data structure with support for URL building.","version":"0.5.1","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"devDependencies":{"mocha":"~1.17.1"},"keywords":["express","named","route","tree","url"],"gitHead":"f35e92b535fcc1f550fd4f856e294f371ff5fe47","bugs":{"url":"https://github.com/artnez/urltree/issues"},"homepage":"https://github.com/artnez/urltree","_id":"urltree@0.5.1","_shasum":"4075da48cd997df682cd1f27c3308442d175ac31","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"artnez","email":"artem@artnez.com"},"maintainers":[{"name":"artnez","email":"artem@artnez.com"}],"dist":{"shasum":"4075da48cd997df682cd1f27c3308442d175ac31","tarball":"https://registry.npmjs.org/urltree/-/urltree-0.5.1.tgz","integrity":"sha512-/kMGnLAx/IHcxcfXlTvXNqwukyQtyJ25oJCpo7CitK3bcjVrpOeKFyXy3FcyiOkBHB6N9FqDnpCvDlmYIhBrZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgaWjZ2z6bm556vdZz1oObVOJOboJ9wmqUSi83R5K8UAiBjplrnFGi573twr/VWjYwrodaKI6gHy+1w2U79EGuIuA=="}]}}},"readme":"[![Build Status](https://travis-ci.org/artnez/urltree.svg?branch=master)](http://travis-ci.org/artnez/urltree)\n\nurltree\n=======\n\nNamed URL data structure with support for URL building.\n\nInstall\n-------\n\n```bash\n$ npm install urltree\n```\n\nDefine URLs\n-----------\n\n```javascript\nvar urltree = require('urltree');\n\nvar urls = urltree({\n  'user': '/user/:id',\n  'file.download': '/product/:product/download/:file',\n  'repo.commit.ref': '/repo/commit/:ref'\n});\n\nurls.user.toString();\n'/user/:id'\n\nurls.file.download.toString();\n'/product/:product/download/:file'\n\nurls.repo.commit.ref.toString();\n'/repo/commit/:ref'\n```\n\nBuild URLs\n----------\n\n```javascript\nurls.user.build({id: 123});\n'/user/123'\n\nurls.user.build()\n// Error: URL build failed. No param id (/user/:id)\n\nurls.file.download.build({product: 'acme', file: 'logo.jpg'});\n'/product/acme/download/logo.jpg'\n\nurls.repo.commit.ref.build({ref: 'HEAD^'});\n'/repo/commit/HEAD^'\n\nurls.repo.commit.ref.build({ref: 'HEAD^'}, true);\n'/repo/commit/HEAD%5E'\n```\n\nExpress 3\n---------\n\n```javascript\nvar express = require('express');\nvar urltree = require('urltree');\n\nvar urls = urltree({\n  'user': '/user/:id'\n});\n\nvar app = express();\n\napp.get(urls.user, function(req, res) {\n  res.send(urls.user.build({id: 123}));\n});\n```\n\nExpress 4\n---------\n\n```javascript\n// ...\n\napp.route(urls.user).get(function(req, res) {\n  res.send(urls.user.build({id: 123}));\n});\n```\n\nExpress + Handlebars\n--------------------\n\n```javascript\nvar express = require('express');\nvar hbs = require('hbs');\nvar urltree = require('urltree');\n\nvar app = express();\n\nvar urls = urltree({\n  'user': '/user/:id'\n});\n\nvar engine = hbs.create();\nengine.registerHelper('route', urls.handlebarsHelper);\napp.engine('hbs', engine.__express);\napp.set('views', '/path/to/views/');\n\napp.use(function(req, res, next) {\n  res.locals.urls = urls;\n  next();\n});\n\napp.get(urls.user, function(req, res) {\n  res.render('user');\n});\n```\n\n```html\n{{route urls.user id=123}}\n```\n\nLicense\n-------\n\nMIT\n","maintainers":[{"name":"artnez","email":"artem@artnez.com"}],"time":{"modified":"2022-06-28T06:31:53.326Z","created":"2014-02-21T06:50:39.160Z","0.1.0":"2014-02-21T06:50:39.160Z","0.1.1":"2014-02-21T06:51:31.803Z","0.1.2":"2014-02-21T06:54:20.512Z","0.2.0":"2014-03-15T21:31:24.972Z","0.2.1":"2014-03-15T22:56:41.469Z","0.2.2":"2014-03-15T22:57:48.332Z","0.2.3":"2014-04-11T16:56:20.141Z","0.3.0":"2014-08-28T23:53:05.646Z","0.4.0":"2014-09-25T07:24:06.010Z","0.5.0":"2014-11-24T17:20:57.203Z","0.5.1":"2014-11-24T17:43:05.834Z"},"readmeFilename":"README.md","homepage":"https://github.com/artnez/urltree","keywords":["express","named","route","tree","url"],"repository":{"type":"git","url":"http://github.com/artnez/urltree"},"author":{"name":"Artem Nezvigin","email":"artem@artnez.com"},"bugs":{"url":"https://github.com/artnez/urltree/issues"},"users":{}}