{"id":18657778,"url":"https://github.com/lightsofapollo/proxied-promise-object","last_synced_at":"2025-11-05T22:30:21.501Z","repository":{"id":12958588,"uuid":"15636904","full_name":"lightsofapollo/proxied-promise-object","owner":"lightsofapollo","description":"Proxy all calls to an objects functions to a wrapper which returns promises","archived":false,"fork":false,"pushed_at":"2015-06-25T22:17:32.000Z","size":604,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-05T02:43:47.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightsofapollo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-04T18:08:04.000Z","updated_at":"2015-06-25T21:34:44.000Z","dependencies_parsed_at":"2022-09-10T08:10:51.956Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/proxied-promise-object","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fproxied-promise-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fproxied-promise-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fproxied-promise-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fproxied-promise-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/proxied-promise-object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239065717,"owners_count":19575773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T07:29:51.550Z","updated_at":"2025-11-05T22:30:21.462Z","avatar_url":"https://github.com/lightsofapollo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proxied-promise-object\n\nProxy all calls to an objects functions to a wrapper which returns\npromises. In addition to wrapping functions this project will also setup\na getter/setter \"proxy\" so you can treat the proxied objects very\nsimilar to their originals (i.e. setting a property on either will\neffect both).\n\nNOTE: This does not use \"real\" proxies (ES6)\n\nWorks in node \u0026 the browser through component\n\n## Usage\n\n```js\nvar proxy = require('proxied-promise-object');\n\nvar fs = proxy(require('fs'), PromiseLibary);\n\nfs.stat('xfoo/...').then(\n  function() {\n  }\n);\n```\n\nProxies are stamped as well to protect wrapping proxies with proxies\n\n```js\nvar fs = proxy(YourFavPromiseLib, require('fs'));\nvar fs2 = proxy(YourFavPromiseLib, fs);\n\n// fs === fs2\n```\n\nIf there is a global promise object (like in the browser):\n\n```js\nvar proxied = proxy(callbackReturningObj);\n```\n\nBy default when you proxy an object it will \"deeply\" traverse the object\ncreating proxies even on nested levels.\n\n```js\nvar proxyObj = proxy(...);\n\nproxyObj.nested.api.call().then(...)\n```\n\nThis can be disabled by passing deep: false:\n\n```js\nproxyObj = proxy(object, Promise, { deep: false });\n```\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Sahaja James Lal\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fproxied-promise-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Fproxied-promise-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fproxied-promise-object/lists"}