aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJason Miller <[email protected]>2021-06-22 18:21:48 -0400
committerJason Miller <[email protected]>2021-06-22 18:21:48 -0400
commit4cce9cb6397af70498525c7b1cc829de2b21edc9 (patch)
tree8ce02051ee44fe760687ff868ec37c76a3affe12 /README.md
parent53eb689c83bca78d9275f724995406495262c333 (diff)
Add support for mitt.off("type"), which removes all handlers of a given type
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index dff9914..9c0bc4d 100644
--- a/README.md
+++ b/README.md
@@ -140,12 +140,12 @@ Register an event handler for the given type.
### off
Remove an event handler for the given type.
-If omit the `handler`, all event handlers of the given type are deleted.
+If `handler` is omitted, all handlers of the given type are removed.
#### Parameters
- `type` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol))** Type of event to unregister `handler` from, or `'*'`
-- `handler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove
+- `handler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** Handler function to remove
### emit