{"id":15660509,"url":"https://github.com/shigma/prochain","last_synced_at":"2025-05-05T21:13:09.468Z","repository":{"id":51111611,"uuid":"361093947","full_name":"shigma/prochain","owner":"shigma","description":"Proxified Promise Chain in JavaScript","archived":false,"fork":false,"pushed_at":"2021-05-23T13:28:03.000Z","size":57,"stargazers_count":21,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T21:12:56.703Z","etag":null,"topics":["chain","javascript","promise","proxy","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/shigma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-24T07:02:31.000Z","updated_at":"2024-09-06T10:17:10.000Z","dependencies_parsed_at":"2022-09-13T13:20:24.785Z","dependency_job_id":null,"html_url":"https://github.com/shigma/prochain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fprochain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fprochain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fprochain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fprochain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shigma","download_url":"https://codeload.github.com/shigma/prochain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252577022,"owners_count":21770721,"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":["chain","javascript","promise","proxy","typescript"],"created_at":"2024-10-03T13:22:04.352Z","updated_at":"2025-05-05T21:13:09.447Z","avatar_url":"https://github.com/shigma.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prochain\n\nProxified Promise Chain in JavaScript.\n\nIt allows for method and property chaining without need for intermediate then() or await for cleaner and simpler code.\n\n```js\nconst { wrap } = require('prochain')\n \n// Instead of thens\nfetch(url)\n  .then(res =\u003e res.json())\n  .then(json =\u003e json.foo.bar)\n  .then(value =\u003e console.log(value))\n\n// Instead of awaits\nconst res = await fetch(url)\nconst json = await res.json()\nconst value = json.foo.bar\nconsole.log(value)\n\n// With prochain\nconst value = await wrap(fetch(url)).json().foo.bar\nconsole.log(value)\n\n// Or you can even create a wrapped fetch\nconst wrapFetch = wrap(fetch)\nconst value = await wrapFetch(url).json().foo.bar\nconsole.log(value)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshigma%2Fprochain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshigma%2Fprochain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshigma%2Fprochain/lists"}