{"id":16758381,"url":"https://github.com/kessler/simply-wait","last_synced_at":"2025-08-12T06:46:31.417Z","repository":{"id":30307788,"uuid":"33859544","full_name":"kessler/simply-wait","owner":"kessler","description":"Simply wait for some async things to happen.","archived":false,"fork":false,"pushed_at":"2022-05-13T21:15:58.000Z","size":17,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T16:11:31.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/kessler.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":"2015-04-13T09:25:47.000Z","updated_at":"2022-05-13T21:16:10.000Z","dependencies_parsed_at":"2022-09-26T16:21:40.824Z","dependency_job_id":null,"html_url":"https://github.com/kessler/simply-wait","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kessler/simply-wait","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Fsimply-wait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Fsimply-wait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Fsimply-wait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Fsimply-wait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kessler","download_url":"https://codeload.github.com/kessler/simply-wait/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Fsimply-wait/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269798820,"owners_count":24477625,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-13T04:05:05.888Z","updated_at":"2025-08-12T06:46:31.382Z","avatar_url":"https://github.com/kessler.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simply-wait\n\nSimply wait for some async things to happen. \n\nMostly useful for event emitters but also for when you just want super stupid simple code.\n\n# Install\n```\n    npm install --save simply-wait\n```\n\n# Example\n```javascript\nvar simplyWait = require('simply-wait')\nvar EventEmitter = require('events').EventEmitter\n\nvar wait = simplyWait(function (err) {\n    console.log('the deed is done!')\n})\n\nvar e1 = new EventEmitter()\nvar e2 = new EventEmitter()\n\ne1.on('get armor', wait())\ne1.on('mount horse', wait())\ne2.on('slay dragon', wait())\n\ne1.emit('get armor')\ne1.emit('mount horse')\ne2.emit('slay dragon')\n\n// console prints \"the deed is done\"\n```\n\nThe final callback will receive the arguments from the last async operation. If you need the results from all the operations then its not \"simply waiting\" anymore so go ahead and use one of the many super elaborate async modules out there... \n\nIf you want to signal the gate:\n```js\nvar simplyWait = require('simply-wait')\n\nvar wait = simplyWait(function (err) {\n    console.log('the deed is done!')\n})\n\nvar notify = wait()\n\nnotify()\n\n// console prints \"the deed is done\"\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkessler%2Fsimply-wait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkessler%2Fsimply-wait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkessler%2Fsimply-wait/lists"}