{"_id":"pathetic","_rev":"1745859","name":"pathetic","description":"Get values by path-like keys","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"time":{"modified":"2026-11-19T14:39:04.000Z","created":"2014-01-28T23:39:42.781Z","1.0.0":"2016-08-25T12:08:28.357Z","0.3.1":"2014-05-07T20:40:52.940Z","0.3.0":"2014-05-07T20:36:17.666Z","0.2.0":"2014-01-29T02:14:24.824Z","0.1.0":"2014-01-28T23:39:42.781Z"},"users":{},"author":{"name":"Scott Corgan"},"repository":{"type":"git","url":"git+https://github.com/scottcorgan/pathetic.git"},"versions":{"1.0.0":{"name":"pathetic","version":"1.0.0","description":"Get values by path-like keys","main":"index.js","scripts":{"test":"mocha --runner spec test/index.js"},"repository":{"type":"git","url":"git+https://github.com/scottcorgan/pathetic.git"},"keywords":["path","path-to-regexp","express","connect","route"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/pathetic/issues"},"devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"dependencies":{"path-to-regexp":"0.1.x","merge":"~1.1.2","zip-object":"~0.1.0","clone":"~0.1.11"},"gitHead":"142417fd9f9dc358a244d704f3d3b112ed55b4ba","homepage":"https://github.com/scottcorgan/pathetic#readme","_id":"pathetic@1.0.0","_shasum":"980d98348a9bd7c6f6a53a4a9144c002aedcbbbc","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"dist":{"shasum":"980d98348a9bd7c6f6a53a4a9144c002aedcbbbc","tarball":"http://registry-npm.ywwl.com/pathetic/download/pathetic-1.0.0.tgz","integrity":"sha512-P1e1/q2lqTvuTpop+uyGQxXWSazCFnVNjb4Y2UoFZN/p1vhdQTlZnxcIKEz2P1OPENR1niQxYHbGXFCy34pnjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAa42svi4i9k8r22Wwd2JrVOC/XLVVdAHYulMxYIkeW+AiEAvB6flQeF+7nnaovx2vlhQynW7QP69XqpnrrcP+JfJ8g="}],"size":1525,"noattachment":false,"key":"/pathetic/-/pathetic-1.0.0.tgz"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pathetic-1.0.0.tgz_1472126906626_0.6877609693910927"},"publish_time":1472126908357,"_cnpm_publish_time":1472126908357},"0.3.1":{"name":"pathetic","version":"0.3.1","description":"Get values by path-like keys","main":"index.js","scripts":{"test":"mocha --runner spec test/index.js"},"repository":{"type":"git","url":"https://github.com/scottcorgan/pathetic.git"},"keywords":["path","path-to-regexp","express","connect","route"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/pathetic/issues"},"devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"dependencies":{"path-to-regexp":"0.1.x","merge":"~1.1.2","zip-object":"~0.1.0","clone":"~0.1.11"},"homepage":"https://github.com/scottcorgan/pathetic","_id":"pathetic@0.3.1","_shasum":"0cf4260fb9ed007209a95642bafa44c87f77d2a2","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"dist":{"shasum":"0cf4260fb9ed007209a95642bafa44c87f77d2a2","tarball":"http://registry-npm.ywwl.com/pathetic/download/pathetic-0.3.1.tgz","integrity":"sha512-jkczjRH/M3RavDfRYJFq49xy7I9U22hQhRqW4RlGBudcvEvC7kcDWPiehtl2r+psoHr603QtP2ZeOx9AozXmTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGooOvdpzI756KTMOeZtQCpzDYl01YNBBuBEQ8rt6qQaAiAPG0GjqXfbAYQyk8NgjLPGSkT9ls46vw4dyK1TMBzB3g=="}],"size":1500,"noattachment":false,"key":"/pathetic/-/pathetic-0.3.1.tgz"},"publish_time":1399495252940,"_cnpm_publish_time":1399495252940},"0.3.0":{"name":"pathetic","version":"0.3.0","description":"Get values by path-like keys","main":"index.js","scripts":{"test":"mocha --runner spec test/index.js"},"repository":{"type":"git","url":"https://github.com/scottcorgan/pathetic.git"},"keywords":["path","path-to-regexp","express","connect","route"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/pathetic/issues"},"devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"dependencies":{"path-to-regexp":"0.0.2","merge":"~1.1.2","zip-object":"~0.1.0","clone":"~0.1.11"},"homepage":"https://github.com/scottcorgan/pathetic","_id":"pathetic@0.3.0","_shasum":"eb40853f881dd28e1970c8b669bd1aac403ffd8d","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"dist":{"shasum":"eb40853f881dd28e1970c8b669bd1aac403ffd8d","tarball":"http://registry-npm.ywwl.com/pathetic/download/pathetic-0.3.0.tgz","integrity":"sha512-N5//2Rml109U7lkEzaVbZbae9dTUAu63sPMfTL/wC2clJlMAOrpFWIiogt2ZjsJlEVL/7yLPcyydA2Bh9kgrcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7yaR6lCQgYEsi7dVaitkdTv1Y2+lU2x90Es0kKu42XAiAtIYDrhmN8jLbJi8KCfWzlWFGhVD/ZsnXQNIt78T3A4Q=="}],"size":1497,"noattachment":false,"key":"/pathetic/-/pathetic-0.3.0.tgz"},"publish_time":1399494977666,"_cnpm_publish_time":1399494977666},"0.2.0":{"name":"pathetic","version":"0.2.0","description":"Get values by path-like keys","main":"index.js","scripts":{"test":"node_modules/.bin/mocha --runner spec test/index.js"},"repository":{"type":"git","url":"https://github.com/scottcorgan/pathetic.git"},"keywords":["path","path-to-regexp","express","connect","route"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/pathetic/issues"},"devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"dependencies":{"path-to-regexp":"0.0.2","merge":"~1.1.2","zip-object":"~0.1.0","clone":"~0.1.11"},"_id":"pathetic@0.2.0","dist":{"shasum":"f4a01916060560062b3d31dce3bd47b9cd4bbcb7","tarball":"http://registry-npm.ywwl.com/pathetic/download/pathetic-0.2.0.tgz","integrity":"sha512-a8XiWQoyRDyEhm7r9IaaIBK8ZLvoDTnoseqvKazm+xJwp3gWUJQo7HZHIIdSdT9L1AtlQHZt8VjuCdyTzrrkWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbGv6VXbm8t0MQh0gQm4/W8Fc5wwXY3pGeUF48agBfYAiBYdx26+/vvKZnx67JSe0d1ErHEBOPKGtpM1C1a446UrQ=="}],"size":1497,"noattachment":false,"key":"/pathetic/-/pathetic-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"publish_time":1390961664824,"_cnpm_publish_time":1390961664824},"0.1.0":{"name":"pathetic","version":"0.1.0","description":"Get values by path-like keys","main":"index.js","scripts":{"test":"node_modules/.bin/mocha --runner spec test/index.js"},"repository":{"type":"git","url":"https://github.com/scottcorgan/pathetic.git"},"keywords":["path","path-to-regexp","express","connect","route"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/pathetic/issues"},"devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"dependencies":{"path-to-regexp":"0.0.2","merge":"~1.1.2","zip-object":"~0.1.0"},"_id":"pathetic@0.1.0","dist":{"shasum":"d66b34da7f67db24c813657b0785f5287af4bab2","tarball":"http://registry-npm.ywwl.com/pathetic/download/pathetic-0.1.0.tgz","integrity":"sha512-wWAftGRncguov8ZJZKsD31ePM2hzcaF/Y12C+UcFjpgwUYIQn9NxTAurZl4MGqnFs5NhWkbblGo4Yq4E6eY/Ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1S1JH4P5VduudSXJbClbYoBBX/pCHtabAF4PYBw/veQIgfIpRKs3rvimblF5oQjgkqskIzaoU7tLanHYGOIN67r8="}],"size":1452,"noattachment":false,"key":"/pathetic/-/pathetic-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"publish_time":1390952382781,"_cnpm_publish_time":1390952382781}},"readme":"# pathetic\n\nGet values by path-like keys\n\n## Install\n\n```\nnpm install pathetic --save\n```\n\n## Usage\n\n```js\nvar pathetic = require('pathetic');\nvar routes = pathetic({\n  '/path': {key: 'value'},\n  '/user/:id': function (req, res) {\n    res.end('GOT IT!')\n  }\n});\n\nvar p = routes('/path'); // OUTPUTS: {key: 'value'}\nvar userPath = routes('/user/123');\n\nuserPath(req, res);\nconsole.log(userPath.params().id == 123);\n```\n\n## API\n\n### pathetic(paths)\n\n* `paths` - a key/value object containing the paths as the keys and anything for the values. This returns a method that lets you query against the table with a path. This uses Express-like paths and breaks out the parameters for your as well.\n\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```","_attachments":{},"homepage":"https://github.com/scottcorgan/pathetic#readme","bugs":{"url":"https://github.com/scottcorgan/pathetic/issues"},"license":"MIT"}