{"id":13701339,"url":"https://github.com/kozhevnikov/proxymise","last_synced_at":"2025-05-04T21:30:46.677Z","repository":{"id":65476841,"uuid":"140777259","full_name":"kozhevnikov/proxymise","owner":"kozhevnikov","description":"Chainable Promise Proxy","archived":false,"fork":false,"pushed_at":"2022-10-05T08:24:32.000Z","size":181,"stargazers_count":555,"open_issues_count":4,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-22T17:58:58.846Z","etag":null,"topics":["javascript","promise","proxy"],"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/kozhevnikov.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":"2018-07-13T00:26:52.000Z","updated_at":"2025-04-19T13:36:37.000Z","dependencies_parsed_at":"2023-01-25T06:25:19.677Z","dependency_job_id":null,"html_url":"https://github.com/kozhevnikov/proxymise","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozhevnikov%2Fproxymise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozhevnikov%2Fproxymise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozhevnikov%2Fproxymise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozhevnikov%2Fproxymise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kozhevnikov","download_url":"https://codeload.github.com/kozhevnikov/proxymise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252403695,"owners_count":21742413,"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":["javascript","promise","proxy"],"created_at":"2024-08-02T20:01:30.681Z","updated_at":"2025-05-04T21:30:46.348Z","avatar_url":"https://github.com/kozhevnikov.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","NodeJS Interesting Module :seedling: :seedling: :seedling:","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# Proxymise\n\n[![npm](https://img.shields.io/npm/v/proxymise.svg)](https://www.npmjs.com/package/proxymise)\n\nChainable Promise Proxy.\n\nLightweight ES6 [Proxy] for [Promises] with no additional dependencies. Proxymise allows for method\nand property chaining without need for intermediate `then()` or `await` for cleaner and simpler code.\n\n[Proxy]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n[Promises]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n\n## Use\n\n```shell\nnpm i proxymise\n```\n\n```javascript\nconst proxymise = require('proxymise');\n\n// Instead of thens\nfoo.then(value =\u003e value.bar())\n  .then(value =\u003e value.baz())\n  .then(value =\u003e value.qux)\n  .then(value =\u003e console.log(value));\n\n// Instead of awaits\nconst value1 = await foo;\nconst value2 = await value1.bar();\nconst value3 = await value2.baz();\nconst value4 = await value3.qux;\nconsole.log(value4);\n\n// Use proxymise\nconst value = await proxymise(foo).bar().baz().qux;\nconsole.log(value);\n```\n\n## Practical Examples\n\n- [Fetch and parse JSON](https://github.com/kozhevnikov/proxymise/blob/master/test/fetch.test.js)\n- [Amazon DynamoDB get item](https://github.com/kozhevnikov/proxymise/blob/master/test/dynamodb.test.js)\n- [Selenium WebDriverJS and Page Objects](https://github.com/kozhevnikov/proxymise/blob/master/test/selenium.test.js)\n\n## Performance\n\nProxymised [benchmark] with 10000 iterations is practically as performant as the non-proxymised one.\n\n[benchmark]: https://github.com/kozhevnikov/proxymise/blob/master/test/benchmark.js\n\n```shell\nnode test/benchmark.js \nwith proxymise: 3907.582ms\nwithout proxymise: 3762.375ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkozhevnikov%2Fproxymise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkozhevnikov%2Fproxymise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkozhevnikov%2Fproxymise/lists"}