MicroEE is an extremely lightweight, EventEmitter-like library designed for both client and server-side event routing. At approximately 50 lines of code and ~1200 characters, it was created to be significantly smaller than other event emitter implementations of its time. The package's current stable version is 0.0.6, which was published nearly a decade ago, indicating it is no longer actively maintained. Its primary differentiators were its minimal footprint and a simple API largely based on Node.js's native EventEmitter, with additions like `emitter.when()` for conditional listener removal and `microee.mixin()` for easily extending objects to become event emitters. It lacks modern features like `async` event handling or native ES module support.
npm install microeeVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use `microee.mixin` to make a class an event emitter, along with basic `on`, `emit`, `once`, and `when` methods.
Use exact string event names. If dynamic event matching is required, implement custom logic or use a different library.
Migrate to a actively maintained event emitter library such as Node.js's built-in `EventEmitter` (if in Node.js) or a modern standalone package like `eventemitter3` or `mitt`.
If using in a modern ES module environment, you might need a CommonJS compatibility layer or bundler configuration to consume it, or simply use `require()` if your environment supports it. Prefer a modern alternative for ESM projects.
Ensure you are using `const MicroEE = require('microee');` in Node.js or confirming the `microee` global is available in your browser context. If using ES modules, you must configure your bundler to handle CommonJS modules or use a different library.Before calling `on` or `emit` methods, ensure your class or object's prototype has been extended with `MicroEE.mixin(MyClass)` for class-based usage, or that you are using an instance created by `new MicroEE()` directly.
No dependency data recorded yet.