aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJason Miller <[email protected]>2020-07-15 14:40:59 +0000
committerJason Miller <[email protected]>2020-07-15 14:40:59 +0000
commit0f41ead697945b38d55435306a21068c04445863 (patch)
treea40295bf7bd467641b7b9edbc819563c636471ef /README.md
parent5116df46a020ae498eec6783cfe9147fc9add015 (diff)
parent76a353cb867a7302a9ddfb9a2a96ab5364af1db9 (diff)
Merge branch 'expose-all' of https://github.com/jaylinski/mitt
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.