Skip to content
CAI
Software that uses CAICheck a score

HowProgrammingWorks/EventEmitter

41.7

Weak · 21 September 2026

901

lines of production code

JavaScript

with Rust, C#, Java

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a multi-language educational repository that provides reference implementations of the event emitter pattern across C\#, Go, Haskell, Java, JavaScript, and Rust. It demonstrates various architectural approaches, including basic, enhanced, and asynchronous variants, while supporting features like wildcard listeners and typed payloads. The project serves as a practical guide for understanding event handling mechanics in different programming ecosystems.

Features

Add Rust EventEmitter implementation

This change introduces a new Rust crate providing an EventEmitter pattern, including a generic \EventEmitter\<T, U\>\ for multiple event types and a single-event \Event\<T\>\ struct for flexible payload handling. The release includes source code for both components, integration tests verifying handler registration and emission, and four example files demonstrating usage with typed enums, string-based events, and mixed payload types.

Rust · high confidence

Added C\# event handling examples and tests

This change introduces new C\# source files demonstrating two event-handling patterns: a standard .NET event implementation via \SimpleEventFlow\ and a JavaScript-style emitter via \JsStyleEventEmitter\. It also adds \ConsoleEventsTest.cs\ to exercise these implementations, allowing users to observe event subscription, emission, and unsubscription behaviors in a console application.

CSharp · high confidence

Added Haskell EventEmitter implementation and usage examples

This change introduces a new Haskell module, \EventEmitter\, which provides a basic event handling system using \Data.Map.Strict\ for storing listeners. It includes functions to register listeners (\on\), emit events (\emit\), and create new emitters (\newEventEmitter\). Additionally, an enhanced version (\EnhancedEmitter\) is provided, extending the base functionality with an \onAny\ listener that triggers on all events (using a wildcard key). The commit also includes usage examples (\1-simple.hs\, \2-usage.hs\, \3-enhanced.hs\, \4-usage.hs\) demonstrating how to instantiate emitters, register specific and wildcard listeners, and emit events with data structures.

Haskell · high confidence

Added Java event emitter implementation and usage example

Introduced a new Java implementation of a simple event emitter pattern in the file 1-simple.java, which allows users to register, emit, and remove listeners for named events using Java's Consumer interface and Optional for null safety. A corresponding usage example in 2-usage.java demonstrates how to instantiate the emitter, register a listener, and trigger an event.

Java · high confidence

Initial project setup and documentation updates

This change establishes the foundational configuration for the project, introducing an .editorconfig for consistent coding styles, a .gitignore to exclude build artifacts, and an MIT LICENSE. It also configures code quality tools by setting up ESLint via the 'eslint-config-metarhia' package and defining Prettier formatting rules. Additionally, the README has been updated to include a link to a video tutorial on timers and EventEmitters.

(repo-wide) · high confidence

Introduction of Go event emitter with wildcard support

This change introduces a Go implementation of an event emitter pattern, providing both a basic \EventEmitter\ for standard named event subscriptions and an \EnhancedEmitter\ that extends this functionality with wildcard event handling via \OnAny\. Users can now register listeners for specific events or subscribe to all events regardless of name, with corresponding example tests demonstrating the usage of both the simple and enhanced emitter capabilities.

Go · high confidence

Behavioural changes

JavaScript EventEmitter examples updated with new implementations and fixes

The JavaScript examples directory has been restructured to include a series of progressively advanced EventEmitter implementations. This includes a basic prototype-based version, a closure-based version, and a production-ready class-based version that uses Maps and Sets for better performance and memory management. A new async EventEmitter class has been added, supporting asynchronous listeners and promise-based emission. Additionally, a fix was applied to the wildcard listener behavior to prevent throwing errors when emitting to the '\*' event, and the 'once' listener removal logic was corrected to ensure proper cleanup.

JavaScript · high confidence

Dependencies

Initial project setup with ESLint 9 and Rust crate

The project now includes a new Rust library named 'event-emitter' (version 0.1.0) defined in Rust/Cargo.toml, alongside a new Node.js project structure. The Node.js setup initializes the project with ESLint 9.12.0, the eslint-config-metarhia 9.1.1 configuration, Prettier 3.3.3, and the hpw 0.2.4 tool, establishing the development and linting environment.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 41 → 42 (+0.6)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 64 → 68 (+4.5)
  • Architecture 69 → 69 (+0.0)
  • Maturity 29 → 29 (+0.0)
  • Readiness 29 → 33 (+3.9)
  • Security 92 → 99 (+7.2)

Resolved (13)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • Low CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • No exposed public API
  • Test reliability not included
  • complexity unreadable for .cs, .go, .rs — churn × complexity hotspots could not be measured
  • dormant codebase — no living knowledge left to concentrate

New (6)

  • Documentation: no contributor guidance (Rust/README.md)
  • Documentation: no usage examples (Rust/README.md)
  • High CVE: [GHSA redacted] (package-lock.json)
  • Outdated (npm): eslint
  • Outdated (npm): eslint-config-metarhia
  • Outdated (npm): prettier

Changes since last survey

  • 3 commits — 2 feature/other, 1 fixes

By area

  • (root) — 2 commits
  • JavaScript/6-closure.js — 1 commit

Notable commits

  • fix: Fix code style
  • change: Update dependencies
  • change: Update license

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

HowProgrammingWorks/EventEmitter was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 7beea611023aab9cce31d6f316d47fa33a5e4ffa — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.