Skip to main content

latest

A simple platform-agnostic event emitter.

Works with
It is unknown whether this package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
94%
Published
3 months ago (0.1.0)

EasyEmit

EasyEmit is a simple platform-agnostic event emitter.

Usage

let emitter = new EventEmitter()

emitter.on('hello', (data) => {
  console.log(`Hello ${data ?? 'world'}`)
})

emitter.emit('hello')
emitter.emit('hello', 'emitter')

Add Package

deno add @otterlord/easyemit

Import symbol

import * as mod from "@otterlord/easyemit";

Add Package

npx jsr add @otterlord/easyemit

Import symbol

import * as mod from "@otterlord/easyemit";

Add Package

yarn dlx jsr add @otterlord/easyemit

Import symbol

import * as mod from "@otterlord/easyemit";

Add Package

pnpm dlx jsr add @otterlord/easyemit

Import symbol

import * as mod from "@otterlord/easyemit";

Add Package

bunx jsr add @otterlord/easyemit

Import symbol

import * as mod from "@otterlord/easyemit";