# @opensumi/events

> A simple event emitter.

Latest version **2.0.0** (published 2024-10-11) · 0 weekly downloads

## Install

```sh
npm install @opensumi/events
pnpm add @opensumi/events
yarn add @opensumi/events
bun add @opensumi/events
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2024-10-11 |
| First published | 2023-12-07 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yantze, ricbet, hacke2, jinboker, ensorrow, sakuraash, erha19, lengthmin |

## Links

- npm: https://www.npmjs.com/package/@opensumi/events
- npm.io page: https://npm.io/package/@opensumi/events

## Recent versions

- 2.0.0 (latest) — 2024-10-11
- 1.0.0 — 2024-02-02
- 0.1.0 — 2023-12-13
- 0.0.6 — 2023-12-07

## README

# @opensumi/events

A simple event emitter.

## Installation

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

## Usage

```ts
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
```

---
_Source: https://npm.io/package/@opensumi/events · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
