Back to Explore

sindresorhus/component-emitter

GitHub
1 watchersOpen source

Last release:

component-emitter is a simple, lightweight event emitter for JavaScript that works in any JS environment, not just Node.js. It lets you create an emitter instance or mix event handling into existing objects and prototypes, using methods like on, once, off, and emit.

A status summary will appear after the next weekly refresh.

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.0.0

    v2.0.0 modernizes component-emitter for Node.js 18+ and adds TypeScript typings. The runtime implementation was substantially refactored to store listeners in a Map instead of the previous object-based structure.

    BreakingFeatures
  • v1.3.1

    This release makes a small metadata update by changing the npm package repository URL to point to the sindresorhus/component-emitter GitHub repository. No runtime code changes are present; the only code diff is within package.json.