{"id":18544741,"url":"https://github.com/131/eventemitter-async","last_synced_at":"2026-01-30T09:49:38.625Z","repository":{"id":73455537,"uuid":"104270135","full_name":"131/eventemitter-async","owner":"131","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-04T00:03:41.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T07:11:41.729Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/131.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-20T21:37:20.000Z","updated_at":"2024-06-04T00:03:42.000Z","dependencies_parsed_at":"2024-06-03T22:21:35.865Z","dependency_job_id":"9651bdf7-dbd8-4203-87ba-44d412a560be","html_url":"https://github.com/131/eventemitter-async","commit_stats":{"total_commits":21,"total_committers":3,"mean_commits":7.0,"dds":"0.47619047619047616","last_synced_commit":"4efd1a5e338445f4253b620f0d923822ad31ab08"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/131/eventemitter-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Feventemitter-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Feventemitter-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Feventemitter-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Feventemitter-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/eventemitter-async/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Feventemitter-async/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259910673,"owners_count":22930702,"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-11-06T20:17:27.615Z","updated_at":"2026-01-30T09:49:38.567Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"eventemitter with async/await. [eventemitter-async](https://github.com/131/eventemitter-async) mimics `require('events').EventEmitter` API.\r\n\r\n\r\n[![Build Status](https://travis-ci.org/131/eventemitter-async.svg?branch=master)](https://travis-ci.org/131/eventemitter-async)\r\n[![Coverage Status](https://coveralls.io/repos/github/131/eventemitter-async/badge.svg?branch=master)](https://coveralls.io/github/131/eventemitter-async?branch=master)\r\n[![Version](https://img.shields.io/npm/v/eventemitter-async.svg)](https://www.npmjs.com/package/eventemitter-async)\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\r\n\r\n\r\n# API\r\n```\r\nvar sleep = require('nyks/async/sleep');\r\nvar Event = require('eventemitter-async');\r\nvar event = new Event();\r\n\r\nvar cafe = {color:'black'};\r\nevent.on(\"start\", async function() {\r\n  await sleep(1);\r\n  console.log(\"Hi, coffee is \", this.color);\r\n}, cafe);\r\n\r\n\r\nevent.emit(\"start\");\r\n```\r\n\r\n# Errors (\u0026promises)\r\nevent.emit() will return a promise you can work with if you need [to handle errors](https://github.com/131/eventemitter-async/blob/master/test/errors.js)\r\n\r\n\r\n\r\n# Notes\r\nYou can set an optional 3rd parameter and set the context (\"this\") in event registration.\r\n\r\n\r\n# Credits\r\n* [131](https://github.com/131)\r\n\r\n\r\n# Keywords / shout box\r\nevents, eventemitter2, uclass, promise, binding\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Feventemitter-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Feventemitter-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Feventemitter-async/lists"}