wolfy87-eventemitter is a JavaScript event emitter library, primarily designed for use in web browsers but also usable in Node.js environments. It aims to replicate the event-driven paradigm found in Node.js, focusing on a lightweight footprint and fast execution. The library underwent a significant API remapping in its fourth major rewrite to improve clarity and extensibility. While npm shows `5.2.9` as the latest version, the project's GitHub repository has had no activity since 2016, with `v4.2.11` being the last officially tagged release. This indicates the project is no longer actively maintained, making `v4.x` the last stable and documented version.
npm install wolfy87-eventemitterVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic event handling: registering, emitting, one-time listeners, and removing listeners.
Consider migrating to an actively maintained event emitter library such as `eventemitter3` or Node.js's built-in `events` module if in a Node environment.
Review The Unlicense terms to ensure compliance with your project's legal requirements.
Refer to the v4.x API documentation for the correct method names and usage patterns, specifically `on`, `emit`, `off`, `once`, `hasListeners`, `getListeners`, `removeAllListeners`.
Update calls to `removeEvent(eventName)` to `removeAllListeners(eventName)` for improved clarity and Node.js API conformity.
Ensure you are using `v4.2.3` or higher to mitigate potential infinite recursion issues with `once` listeners.
Ensure you are using the correct import/require syntax for your environment. For modern ESM environments: `import EventEmitter from 'wolfy87-eventemitter';`. For CommonJS: `const EventEmitter = require('wolfy87-eventemitter');`. In browsers (script tag), it might be globally available as `window.EventEmitter`.Verify that your `EventEmitter` instance (`emitter` in examples) is properly initialized with `new EventEmitter()` before attempting to use its methods.
Upgrade to `v4.2.7` or later, which includes a fix for this specific Android 2.2 browser bug. Note that this is for a very old browser version.
No dependency data recorded yet.