{"bugs":{"url":"https://github.com/jclem/path-proxy/issues"},"dist":{"shasum":"a367f935d635f907cb6f4f844252b0a4609b4d9f","tarball":"https://registry.npmjs.org/path-proxy/-/path-proxy-0.0.0.tgz","integrity":"sha512-ywtP/Ac344dVXLdvY2KUp9goAZHJIx8M/26oMSB1isxn4MOw6paQdIhOYsU0En0Q3/rsLcBNdlQpuiNUGHUpzA==","signatures":[{"sig":"MEQCIAyR59Pl4hLfYBOZuNjBeZC4h6NqO3sWf9C2F/owO43YAiBD+cpwTam9Fj9qXXQPyZx7KwTFWeUV6N4D/Db3EB6Nuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","name":"path-proxy","_from":".","author":{"name":"Jonathan Clem"},"readme":"# path-proxy\n\npath-proxy is based on my work on the [Node client for the Heroku API][heroku_client].\nIts purpose is to, given a base constructor function and an array of paths (most\nlikely for an API), build a network of proxy object constructors on top of that\nbase constructor.\n\n## Example:\n\n```javascript\nvar pathProxy = require('path-proxy');\n\nfunction Client () {\n}\n\nClient.prototype.sayHello = function () {\n  return \"hello\";\n}\n\npathProxy.proxy(Client, [\n  \"/foo\",\n  \"/foo/{id}/bar\",\n  \"/foo/{id}/bar/{id}/baz\"\n]);\n\nvar client = new Client(),\n    baz    = client.foo(\"a\").bar(\"b\").baz();\n\n// `baz` is a proxy object for \"/foo/a/bar/b/baz\". It also has access to\n// `client` through its `base` parameter.\nbaz.params;          // [\"a\", \"b\"]\nbaz.path;            // \"/foo/a/bar/b/baz\"\nbaz.base.sayHello(); // \"hello\"\n```\n\nProxy constructor functions can also be fetched individually:\n\n```javascript\nvar qux = pathProxy.pathProxy(Client, \"/qux\");\n\nqux.prototype.foo = function () {\n  return \"foo\";\n}\n\nclient.qux().foo(); // \"foo\"\n```\n\nNote that **this project is still extremely unstable**. As in, don't be surprised\nat awful things like force-pushes to master.\n\n[heroku_client]: https://github.com/heroku/node-heroku-client\n","license":"MIT","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"jclem","email":"jonathan@jclem.net"},"keywords":["node","proxy"],"repository":{"url":"https://github.com/jclem/path-proxy","type":"git"},"_npmVersion":"1.3.11","description":"A path proxy object constructor","directories":{},"maintainers":[{"name":"jclem","email":"jonathan@jclem.net"}],"dependencies":{"inflection":"~1.3.0"},"readmeFilename":"README.md","_id":"path-proxy@0.0.0","version":"0.0.0"}