1.0.0 • Published 3 months ago

@opensumi/events v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

@opensumi/events

A simple event emitter.

Installation

npm install @opensumi/events
# or
yarn add @opensumi/events

Usage

import { EventEmitter } from '@opensumi/events';

const emitter = new EventEmitter<{
  foo: [string, string];
}>();

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

emitter.emit('foo', 'bar', 'baz'); // => bar baz
1.0.0

3 months ago

0.1.0

5 months ago

0.0.6

5 months ago