Skip to main content
Home

latest

A simple platform-agnostic event emitter.

This package works with Cloudflare Workers, Node.js, Deno, BrowsersIt 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
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
94%
Published
a year 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')

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@otterlord/easyemit

Import symbol

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

Import directly with a jsr specifier

import * as easyemit from "jsr:@otterlord/easyemit";

Add Package

pnpm i jsr:@otterlord/easyemit
or (using pnpm 10.8 or older)
pnpm dlx jsr add @otterlord/easyemit

Import symbol

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

Add Package

yarn add jsr:@otterlord/easyemit
or (using Yarn 4.8 or older)
yarn dlx jsr add @otterlord/easyemit

Import symbol

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

Add Package

vlt install jsr:@otterlord/easyemit

Import symbol

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

Add Package

npx jsr add @otterlord/easyemit

Import symbol

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

Add Package

bunx jsr add @otterlord/easyemit

Import symbol

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