mitt icon indicating copy to clipboard operation
mitt copied to clipboard

🥊 Tiny 200 byte functional event emitter / pubsub.

Results 32 mitt issues
Sort by recently updated
recently updated
newest added

I thought it would be more intuitive to return a clear method, so I did so.

I'm looking for an eventemitter library for our cross platform framework, which will be run in pure V8 JS engine (Not NodeJS or browser environment). I prefer to use mitt...

Hi, I want to define an events interface like so: ```ts const events = { test: (payload) => { console.log(payload); }, another: (payload) => { console.log(payload); } } as const;...

types

**I found some problems with mitt. Will these problems be considered in the future?** ```javascript const emitter = mitt(); emitter.on("evt", () => {}); emitter.on("evt", () => { throw "some error."...

enhancement
question

``` type TFsBaseToolEvent = { startTool?: string; cancelTool?: string; }; interface IbaseTool { test: (s: T) =>void; event: Emitter; event2: Emitter; } class BaseTool implements IbaseTool { event: Emitter; referenceEvent:...

help wanted
types

**Motivation** I believe this is quite common use-case where you have to listen for an even only once (for example, module getting `ready`). The library does not support this inherently...

enhancement

I have an odd requirement with a new project which requires me to establish communication between a component running inside of an iframe, although this could be a separate tab,...

There's a risk that a event is emitted before its' handler has been registered. You might say that such code is bad design, but I'd like to be lazy ;)...

I`m struggling to make it work with a nuxt3 project (static , ssr:false). Basically it DOES emit the events, but it's harder to receive them. I added this in: current...

This is another take on the proposed behavior from #42, where `on()` returns a function that can be called to remove the added listener. My concerns remain, however, and I...