# safe-event-emitter

> An `EventEmitter` that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a `setTimeout` so as to not interupt the emitter's code flow.

Latest version **1.0.1** (published 2018-10-04) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install safe-event-emitter
pnpm add safe-event-emitter
yarn add safe-event-emitter
bun add safe-event-emitter
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-10-04 |
| First published | 2018-10-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kumavis |

## Links

- npm: https://www.npmjs.com/package/safe-event-emitter
- npm.io page: https://npm.io/package/safe-event-emitter

## Dependencies (1)

- [events](https://npm.io/package/events.md) ^3.0.0

## Recent versions

- 1.0.1 (latest) — 2018-10-04
- 1.0.0 — 2018-10-04

## README

# safe-event-emitter

An `EventEmitter` that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a `setTimeout` so as to not interupt the emitter's code flow.

API is the same as `EventEmitter`.

### usage

```js
const SafeEventEmitter = require('safe-event-emitter')

const ee = new SafeEventEmitter()
ee.on('boom', () => { throw new Error() })
ee.emit('boom') // no error here

// error is thrown after setTimeout
```

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