{"id":16186197,"url":"https://github.com/zenflow/p-call","last_synced_at":"2025-04-07T13:21:50.242Z","repository":{"id":57317377,"uuid":"114417274","full_name":"zenflow/p-call","owner":"zenflow","description":"Call a legacy async method and return a promise","archived":false,"fork":false,"pushed_at":"2018-03-15T16:34:00.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T18:37:28.448Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-15T22:47:19.000Z","updated_at":"2019-02-09T00:51:47.000Z","dependencies_parsed_at":"2022-08-25T20:40:34.364Z","dependency_job_id":null,"html_url":"https://github.com/zenflow/p-call","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/zenflow%2Fp-call","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fp-call/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fp-call/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fp-call/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenflow","download_url":"https://codeload.github.com/zenflow/p-call/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657248,"owners_count":20974350,"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-10-10T07:17:33.471Z","updated_at":"2025-04-07T13:21:50.221Z","avatar_url":"https://github.com/zenflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p-call\nCall a legacy async method and return a promise\n\nVery similar to [promisify-call](https://github.com/bojand/promisify-call) but always promisifies the call, rather than guessing if it should.\n\n---\n\n### Example\n\nInstead of using the legacy error-first callback API ...\n\n```js\nobject.method(argument, (error, result) =\u003e {\n  if (error) {\n    throw error\n  }\n  console.log(result)\n})\n```\n\nUse the Promise API ...\n\n```js\nconst result = await pCall(object, object.method, argument)\nconsole.log(result)\n\n// Or, specify the function as a property key of `object`...\nconst result = await pCall(object, 'method', argument)\nconsole.log(result)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenflow%2Fp-call","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenflow%2Fp-call","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenflow%2Fp-call/lists"}