{"id":32639350,"url":"https://github.com/valesdev/events-promisify","last_synced_at":"2025-10-31T02:11:01.577Z","repository":{"id":57157758,"uuid":"199105087","full_name":"valesdev/events-promisify","owner":"valesdev","description":"Just another JavaScript EventEmitter for Promise.","archived":false,"fork":false,"pushed_at":"2022-03-07T12:47:44.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T23:47:35.049Z","etag":null,"topics":["eventemitter","events","promise"],"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/valesdev.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":"2019-07-27T02:26:56.000Z","updated_at":"2022-02-27T12:25:39.000Z","dependencies_parsed_at":"2022-09-07T18:31:47.004Z","dependency_job_id":null,"html_url":"https://github.com/valesdev/events-promisify","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/valesdev/events-promisify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valesdev%2Fevents-promisify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valesdev%2Fevents-promisify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valesdev%2Fevents-promisify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valesdev%2Fevents-promisify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valesdev","download_url":"https://codeload.github.com/valesdev/events-promisify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valesdev%2Fevents-promisify/sbom","scorecard":{"id":915131,"data":{"date":"2025-08-11","repo":{"name":"github.com/valesdev/events-promisify","commit":"5ba221b6a8896dce1919ea2e82c64488044a287e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T20:41:07.849Z","repository_id":57157758,"created_at":"2025-08-24T20:41:07.849Z","updated_at":"2025-08-24T20:41:07.849Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281914569,"owners_count":26583084,"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-10-31T02:00:07.401Z","response_time":57,"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":["eventemitter","events","promise"],"created_at":"2025-10-31T02:10:59.730Z","updated_at":"2025-10-31T02:11:01.571Z","avatar_url":"https://github.com/valesdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# events-promisify\n\n[![Version](https://img.shields.io/npm/v/events-promisify.svg)](https://www.npmjs.com/package/events-promisify)\n[![Downloads](https://img.shields.io/npm/dm/events-promisify.svg)](https://npmcharts.com/compare/events-promisify?minimal=true)\n[![License](https://img.shields.io/npm/l/events-promisify.svg)](https://www.npmjs.com/package/events-promisify)\n\nJust another JavaScript EventEmitter for Promise.\n\n## Installation\n\n### Node.js\n\n```sh\n$ npm install --save events-promisify\n```\n\n### Browser via CDN\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/events-promisify/dist/index.umd.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n```js\nimport EventEmitter from 'events-promisify'\n\nconst ee = new EventEmitter()\n\nee.on('event-a', function () {\n  /**\n   * listener can return a Promise instance\n   * all listeners will be executed serially\n   */\n  return new Promise(function (resolve, reject) {\n    /** resolve asynchronously */\n    setTimeout(function () {\n      resolve('the result')\n    }, 1e3)\n    /**\n     * ...or reject with an Error instance\n     * will cause the emitter rejected immediately\n     */\n    // reject(new Error('Failed!'))\n  })\n})\n\nee.once(['event-a', 'event-b'], function (arg1, arg2) {\n  /** ...or return anything */\n  return `foo ${arg1} bar ${arg2}`\n})\n\nee.on('event-b', function () {\n  /**\n   * ...or throw an Error instance\n   * also will cause the emitter rejected immediately\n   */\n  throw new Error('Failed!')\n})\n\nee.emit('event-a', 11, 22)\n  .then(function (results) {\n    /** event finished */\n  })\n  .catch(function (error) {\n    /** event failed with error */\n  })\n```\n\n## API\n\n### `ee.on(\u003ceventName\u003e, \u003cfunc\u003e)`\n\nListen on events.\n\n| Parameter | Type | Description | Default |\n| --- | --- | --- | --- |\n| `eventName` | String\\|String[] | The event name or array of event names. | (required) |\n| `func` | Function | The listener function. | (required) |\n\n- Returns: `void`\n\n### `ee.once(\u003ceventName\u003e, \u003cfunc\u003e)`\n\nListen on events for one-time execution.\n\n| Parameter | Type | Description | Default |\n| --- | --- | --- | --- |\n| `eventName` | String\\|String[] | The event name or array of event names. | (required) |\n| `func` | Function | The listener function. | (required) |\n\n- Returns: `void`\n\n### `ee.off(\u003ceventName\u003e, \u003cfunc\u003e)`\n\nRemove listener for events.\n\n| Parameter | Type | Description | Default |\n| --- | --- | --- | --- |\n| `eventName` | String\\|String[] | The event name or array of event names. | (required) |\n| `func` | Function | The listener function. | (required) |\n\n- Returns: `void`\n\n### `ee.emit(\u003ceventName\u003e, [...args])`\n\nListen on events.\n\n| Parameter | Type | Description | Default |\n| --- | --- | --- | --- |\n| `eventName` | String | The event name. | (required) |\n| `args` | ...any | Arguments passed to listeners. | |\n\n- Returns: `Promise\u003cany\u003e`\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalesdev%2Fevents-promisify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalesdev%2Fevents-promisify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalesdev%2Fevents-promisify/lists"}