1.0.17 • Published 8 days ago

@3xpo/events v1.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
8 days ago

@3xpo/events

repo image

documentation npm codeberg mit license mom made pizza mom made pizza build hopefully succeeded

Installation

pnpm i @3xpo/events

Usage

import EventEmitter from '@3xpo/events';

const emitter = new EventEmitter<{
  event1: (arg1: string, arg2: number) => void;
  event2: (arg1: string) => void;
}>();

emitter.on('event1', (arg1, arg2) => {
  console.log(arg1, arg2);
});

emitter.emit('event1', 'hello', 123);

Note

The EventEmitter is typesafe. If you want a non-typesafe eventemitter, either pass <any> or use NodeEventEmitter.

Note that typesafety is not available in pure JS.

1.0.17

8 days ago

1.0.16

2 months ago

1.0.15

2 months ago

1.0.14

2 months ago

1.0.13

2 months ago

1.0.12

3 months ago

1.0.11

3 months ago

1.0.10

3 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago