@exodus/wild-emitter
v1.1.2
Published
Wildcard emitter implementation
Downloads
14,466
Readme
@exodus/wild-emitter
Wildcard emitter implementation
Install
yarn add @exodus/wild-emitter
Usage
const emitter = new Emitter()
const handler = ({ type, payload }) => {}
emitter.subscribe(handler)
emitter.emit('avada-kedavra', { author: 'voldemort', target: 'harry' })
emitter.unsubscribe(handler)