New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

eemitt

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eemitt

A lightweight, TypeScript-native event emitter library supporting modular event listeners, one-time triggers, propagation control, and more.

latest
Source
npmnpm
Version
3.0.1
Version published
Maintainers
1
Created
Source

eemitt

npm package

NPM version NPM Downloads jsdelivr

A lightweight, TypeScript-native event emitter library supporting modular event listeners, one-time triggers, propagation control, and more.

Features

  • TypeScript Support: Full type definitions and generic support
  • High Performance: Minimal memory and execution overhead
  • Propagation Control: stopImmediatePropagation() halts further listener execution
  • Flexible Binding: Supports batch event operations
  • Mixin Mode: Inject event capabilities into any object using mixin
  • Custom Event Data: Pass complex data via EventType objects

Documentation

For detailed usage instructions and API references, please visit the official documentation:

👉 View Full Documentation

Quick Start

Basic Usage

import { Emitter } from 'eemitt';

// Create event emitter
const emitter = new Emitter();

// Add listener
emitter.on('message', (evt) => {
  console.log('Received message:', evt.payload);
});

// Emit event with data
emitter.emit({ type: 'message', payload: 'Hello World' });
// Output: Received message: Hello World

Contributing

We welcome contributions from the community! If you find a bug or want to suggest an improvement, feel free to open an issue or submit a pull request.

How to Contribute

  • Fork the repository.
  • Create a new branch for your changes.
  • Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License.

Browser Support

ChromeFirefoxSafariOperaEdge
Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔

Keywords

events

FAQs

Package last updated on 09 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts