{"id":22123375,"url":"https://github.com/drpaulbrewer/after-operation","last_synced_at":"2025-03-24T07:28:49.854Z","repository":{"id":57174368,"uuid":"89065829","full_name":"DrPaulBrewer/after-operation","owner":"DrPaulBrewer","description":"Convert Google Compute Engine [tm] operation event-emitters to Promises","archived":false,"fork":false,"pushed_at":"2020-06-03T08:57:17.000Z","size":247,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T13:08:39.650Z","etag":null,"topics":["google-compute-engine","operation","promise-wrapper"],"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/DrPaulBrewer.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-04-22T11:47:57.000Z","updated_at":"2019-10-25T05:13:28.000Z","dependencies_parsed_at":"2022-08-28T20:52:25.333Z","dependency_job_id":null,"html_url":"https://github.com/DrPaulBrewer/after-operation","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/DrPaulBrewer%2Fafter-operation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fafter-operation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fafter-operation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrPaulBrewer%2Fafter-operation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrPaulBrewer","download_url":"https://codeload.github.com/DrPaulBrewer/after-operation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245226921,"owners_count":20580771,"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":["google-compute-engine","operation","promise-wrapper"],"created_at":"2024-12-01T15:32:42.923Z","updated_at":"2025-03-24T07:28:49.823Z","avatar_url":"https://github.com/DrPaulBrewer.png","language":"JavaScript","readme":"# after-operation\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/DrPaulBrewer/after-operation.svg)](https://greenkeeper.io/)\n\n[![Build Status](https://travis-ci.org/DrPaulBrewer/after-operation.svg?branch=master)](https://travis-ci.org/DrPaulBrewer/after-operation)\n[![Coverage Status](https://coveralls.io/repos/github/DrPaulBrewer/after-operation/badge.svg?branch=master)](https://coveralls.io/github/DrPaulBrewer/after-operation?branch=master)\n\nHelper for converting Google Compute Engine [tm] operation event-emitters to Promises\n\n## Deprecation Notice\n\nOct. 2019: Since GCE operations support `operation.promise()` you should probably use that instead. \n\n## Installation\n\n    npm i after-operation -S\n\n\n## Initialization\n\n    const after = require('after-operation');\n\n## Usage\n\nPromise to return a value after an operation completes:\n\n    // some @google-cloud/compute method returns an operation\n    after(operation, onSuccessValue)\n    .then( (v)=\u003e(assert.equal(v, onSuccessValue)) )\n    .catch(logTheOperationErrors)\n\nPromise to call a function after the operation completes:\n\n    after(operation, (meta)=\u003e(meta) )\n    .then(doSomethingUseful)\n    .catch(logTheOperationErrors)\n\n\nNote that the success function gets fed with the metadata emitted in the operation 'complete' event.\n\nBy using the identity function as the success function, the promise will resolve to that metadata.\n\nNote: after-operation will remove all operation listeners on either operation complete or operation error.\n\n## Related modules by other authors \n\n[npm: event-to-promise](https://www.npmjs.com/package/event-to-promise) might be useful\nwith other eventEmitters.\n\n## Copyright\n\n2017 Paul Brewer - Economic and Financial Technology Consulting LLC \u003cdrpaulbrewer@eaftc.com\u003e\n\n## License\n\nThe MIT License\n\n### Trademarks\n\nGoogle Compute Engine [tm] is a trademark of Google, Inc.\n\nThis software is not a product of Google, Inc.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrpaulbrewer%2Fafter-operation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrpaulbrewer%2Fafter-operation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrpaulbrewer%2Fafter-operation/lists"}