emittery icon indicating copy to clipboard operation
emittery copied to clipboard

Simple and modern async event emitter

Results 19 emittery issues
Sort by recently updated
recently updated
newest added

Fixes #97. I implemented @thetutlage's solution [here](https://github.com/sindresorhus/emittery/issues/97#issuecomment-1129591450).

The https://github.com/sindresorhus/emittery/pull/96 introduces a regression when emittery is used as a sub-class. Lemme share a code sample. ```ts const Emittery = require("emittery"); class MyEmitter extends Emittery { async emit(eventName, data)...

Usage case: 1) On new requiest an event `request` fired. This allows to capture request state and deserialize access tokens, session from cookies, etc. 2) On just before the body...

https://github.com/sindresorhus/emittery/blob/c4c11e44c8a02f20d0d1cb0257aa0921c9d7d4d2/index.test-d.ts#L261-L280

bug
help wanted
good first issue

My emitter: ```ts import Emittery from 'emittery' import { logger } from './' const eventBus: Emittery = new Emittery({ debug: { name: 'eventBus', enabled: process.env.ENVIRONMENT !== 'production', logger: (type, debugName,...

bug
help wanted

![image](https://user-images.githubusercontent.com/6134511/122899500-2b28c700-d34c-11eb-8664-fd02b03a22b2.png) ![image](https://user-images.githubusercontent.com/6134511/122899633-47c4ff00-d34c-11eb-951e-b2a20f31dfa4.png) My usage, I'm using `Ref` because we are using Vue in this project. ```typescript const bus = ref(new Bus()) bus.value.emitter.on("newDataRequest", loadNewDataRequests) ``` `loadNewDataRequests` is of signature `() =>...

Hi, thanks for your great work. Does Emittery support wildcard emit?

enhancement
help wanted

See the initial attempt and feedback in https://github.com/sindresorhus/emittery/pull/19.

enhancement
help wanted

When trying to subscribe to listener's added / removed on the `Emittery.Typed` class, TypeScript (v. 3.9.5) complains that: ``` src/utils.ts:68:13 - error TS2769: No overload matches this call. Overload 1...

If I have the following snippet ```ts emitter.on(Emittery.listenerAdded, () => { console.log('Count: ', emitter.listenerCount('helloEvent')) }) emitter.on('helloEvent', () => {}) emitter.on('helloEvent', () => {}) ``` Then I get printed: ``` Count:...

bug
help wanted