{"id":24811126,"url":"https://github.com/lukks/like-events","last_synced_at":"2025-08-25T13:17:49.897Z","repository":{"id":136038032,"uuid":"222555076","full_name":"LuKks/like-events","owner":"LuKks","description":"Extends events with async for better flow","archived":false,"fork":false,"pushed_at":"2020-01-06T20:14:47.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T09:55:11.062Z","etag":null,"topics":["async","events","extends","flow","like"],"latest_commit_sha":null,"homepage":"https://npmjs.com/like-events","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/LuKks.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,"zenodo":null}},"created_at":"2019-11-18T22:15:08.000Z","updated_at":"2022-07-25T03:55:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3a1665d-88a9-40d8-b367-a2290d16a215","html_url":"https://github.com/LuKks/like-events","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LuKks/like-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuKks%2Flike-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuKks%2Flike-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuKks%2Flike-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuKks%2Flike-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuKks","download_url":"https://codeload.github.com/LuKks/like-events/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuKks%2Flike-events/sbom","scorecard":{"id":85966,"data":{"date":"2025-08-11","repo":{"name":"github.com/LuKks/like-events","commit":"d02dba8e5e23e6aa6e555c170d22fd7dee34be89"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"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":"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":"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-15T06:57:03.592Z","repository_id":136038032,"created_at":"2025-08-15T06:57:03.593Z","updated_at":"2025-08-15T06:57:03.593Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272072383,"owners_count":24868437,"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-25T02:00:12.092Z","response_time":1107,"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":["async","events","extends","flow","like"],"created_at":"2025-01-30T12:19:26.640Z","updated_at":"2025-08-25T13:17:49.889Z","avatar_url":"https://github.com/LuKks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# like-events\n\nExtends events with async for better flow\n\n![](https://img.shields.io/npm/v/like-events.svg) ![](https://img.shields.io/npm/dt/like-events.svg) ![](https://img.shields.io/badge/tested_with-tap-e683ff.svg) ![](https://img.shields.io/github/license/LuKks/like-events.svg)\n\n```javascript\nconst LikeEmitter = require('like-events');\nconst emitter = new LikeEmitter();\n\nemitter.on('change', async function () {\n  await sleep(1000);\n  return true;\n});\n\nemitter.on('change', async function () {\n  await sleep(1000);\n  return false;\n});\n\n// it just takes 1s\nemitter.emitAll('change').then(console.log); // [true, false]\n\n// util\nfunction sleep (ms) {\n  return new Promise(resolve =\u003e setTimeout(resolve, ms));\n}\n```\n\n## Install\n```\nnpm i like-events\n```\n\n## Features\n#### Description\nExtension of native events module (EventEmitter).\\\nUseful for async operations.\n\n#### Methods\n```javascript\nlike.emitSync(event: String, ...args): Array\nlike.emitAll(event: String, ...args): Promise-\u003eArray\nlike.emitSeq(event: String, ...args): Promise-\u003eArray\n```\n\n## Examples\n#### emitSync\n```javascript\nemitter.on('update', function () {\n  return true;\n});\n\nemitter.on('update', function () {\n  return false;\n});\n\nconsole.log(emitter.emitSync('update'));\n```\n```\n[true, false]\n```\n\n#### emitAll\n```javascript\nemitter.on('change', async function () {\n  console.log('change A1');\n  await sleep(1000);\n  console.log('change A2');\n  return true;\n});\n\nemitter.on('change', async function () {\n  console.log('change B1');\n  await sleep(1000);\n  console.log('change B2');\n  return false;\n});\n\nconsole.log(await emitter.emitAll('change'));\n```\n```\nchange A1\nchange B1\nsleep +1s\nchange A2\nchange B2\n[true, false]\n```\n\n#### emitSeq\n```javascript\nemitter.on('processing', async function () {\n  console.log('processing A');\n  await sleep(1000);\n  return 49;\n});\n\nemitter.on('processing', async function () {\n  console.log('processing B');\n  return 51;\n});\n\nconsole.log(await emitter.emitSeq('processing'));\n```\n```\nprocessing A\nsleep +1s\nprocessing B\n[49, 51]\n```\n\n## Tests\n```\nnpm test\n```\n\n## Issues\nFeedback, ideas, etc are very welcome so feel free to open an issue.\n\n## License\nCode released under the [MIT License](https://github.com/LuKks/like-events/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukks%2Flike-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukks%2Flike-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukks%2Flike-events/lists"}