aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index b6a8022..08a21bf 100644
--- a/README.md
+++ b/README.md
@@ -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.