diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -69,6 +69,9 @@ emitter.on('*', (type, e) => console.log(type, e) ) // fire an event emitter.emit('foo', { a: 'b' }) +// clearing all events +emitter.all.clear() + // working with handler references: function onFoo() {} emitter.on('foo', onFoo) // listen @@ -99,6 +102,7 @@ const emitter: mitt.Emitter = mitt(); #### Table of Contents - [mitt](#mitt) +- [all](#all) - [on](#on) - [Parameters](#parameters) - [off](#off) @@ -112,6 +116,10 @@ Mitt: Tiny (~200b) functional event emitter / pubsub. Returns **Mitt** +### all + +A Map of event names to registered handler functions. + ### on Register an event handler for the given type. |
