{"id":18853276,"url":"https://github.com/martinsik/light-event-emitter","last_synced_at":"2026-05-04T13:31:21.796Z","repository":{"id":139107889,"uuid":"133649462","full_name":"martinsik/light-event-emitter","owner":"martinsik","description":"Lightweight version of Angular's EventEmitter for better performance","archived":false,"fork":false,"pushed_at":"2018-05-16T13:30:28.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T13:11:33.795Z","etag":null,"topics":["angular","eventemitter","performance","rxjs"],"latest_commit_sha":null,"homepage":null,"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/martinsik.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":"2018-05-16T10:27:41.000Z","updated_at":"2018-05-16T17:46:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"57ffe34a-bc50-4dbb-b762-6e62f8a47c79","html_url":"https://github.com/martinsik/light-event-emitter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martinsik/light-event-emitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsik%2Flight-event-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsik%2Flight-event-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsik%2Flight-event-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsik%2Flight-event-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinsik","download_url":"https://codeload.github.com/martinsik/light-event-emitter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsik%2Flight-event-emitter/sbom","scorecard":{"id":621975,"data":{"date":"2025-08-11","repo":{"name":"github.com/martinsik/light-event-emitter","commit":"ed2a0a28141ee99f1d1f7c5ab5a997a9a82ddb78"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"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":"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/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":"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":"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":"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":"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":"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"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T05:24:55.141Z","repository_id":139107889,"created_at":"2025-08-21T05:24:55.141Z","updated_at":"2025-08-21T05:24:55.141Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32609354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","eventemitter","performance","rxjs"],"created_at":"2024-11-08T03:43:39.349Z","updated_at":"2026-05-04T13:31:21.757Z","avatar_url":"https://github.com/martinsik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/martinsik/light-event-emitter.svg?branch=master)](https://travis-ci.org/martinsik/light-event-emitter)\n\n\n# LightEventEmitter\n\n`LightEventEmitter` is a simplified version Angular's default `EventEmitter` class that is used for all `Output()` bindings. It removes some of `EventEmitter`'s functionality that isn't necessary in 99.9% of use-cases in exchange for performance. \n\n`LightEventEmitter` is a drop-in replacement for `EventEmitter`.\n\n## Instalation\n\n    npm i light-event-emitter\n    \n## Usage\n\nJust use it instead of `EventEmitter`.\n\n    import { LightEventEmitter } from 'light-event-emitter';\n    \n    @Component({\n      selector: 'my-component',\n      template: `...`,\n    })\n    export class MyComponent {\n    \n      @Output() out = new LightEventEmitter();\n      \n      ...\n      \n    }\n\n## How it works\n\nPurpose of this project is also to test performance impact of creating components with 1, 5 and 10 output bindings (`@Output`) using the default `EventEmitter` class and `LightEventEmitter`.\n\nFrom the results bellow it's obvious that the number of subscriptions a component has **does have performance impact**.\n\nAngular's `EventEmitter` class inherits from RxJS's `Subject` which means it does a lot of overhead work that is almost never necessary. In particular RxJS Subjects support `error` and `complete` notifications that are never useful when sending events via `@Output`. This means that Subjects have to maintain and check their internal state on every **new subscription** and even more importantly on **every `next()` emission**. However, in typical use-cases with `@Output` this is never necessary and thus we could be using `@Output` with some other object than `EventEmitter` without all this unnecessary functionality that could perform much better.\n\n`LightEventEmitter` is stripped of its internal state which makes subscriptions faster and emitting values even faster. For this reason it doesn't support `error` and `complete` notifications.\n\n## Performance\n\nSee live benchmark (takes about a minute to finish): https://stackblitz.com/edit/light-event-emitter-test?file=src%2Fapp%2Fapp.component.ts\n\nThe following image shows a typical result ran on dual core MacBook Pro (mid 2012).\n\n![typical results](https://raw.githubusercontent.com/martinsik/light-event-emitter/master/doc/results-0.png)\n\n*(Lower number is better)*\n\n![results in a bar chart](https://raw.githubusercontent.com/martinsik/light-event-emitter/master/doc/bar-chart.png)\n\nTests with a large number of components are measured as time Angular spent creating, adding them to the page and creating bindings.\n\nThe last test with emissions just emits very large number of `next()` items to its parent. \n\nThe performance improvement grows with the number of bindings:\n\n![performance improvement with LightEventEmitter](https://raw.githubusercontent.com/martinsik/light-event-emitter/master/doc/line-chart.png)\n\n## Licence\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinsik%2Flight-event-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinsik%2Flight-event-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinsik%2Flight-event-emitter/lists"}