Skip to content

Commit a0578b7

Browse files
committed
Docs update.
1 parent f38922a commit a0578b7

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,39 +92,45 @@ let emitter: mitt.Emitter = new mitt();
9292

9393
## API
9494

95+
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
96+
9597
### mitt
9698

9799
Mitt: Tiny (~200b) functional event emitter / pubsub.
98100

99-
Returns **Mitt**
100-
101-
#### emit
102-
103-
Invoke all handlers for the given type.
104-
If present, `"*"` handlers are invoked after type-matched handlers.
105-
106101
**Parameters**
107102

108-
- `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The event type to invoke
109-
- `evt` **\[Any]** Any value (object is recommended and powerful), passed to each handler
103+
- `all` **EventHandlerMap**
104+
105+
Returns **Mitt**
110106

111107
### on
112108

113109
Register an event handler for the given type.
114110

115111
**Parameters**
116112

117-
- `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to listen for, or `"*"` for all events
118-
- `handler` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function to call in response to given event
113+
- `type` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to listen for, or `"*"` for all events
114+
- `handler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Function to call in response to given event
119115

120116
### off
121117

122118
Remove an event handler for the given type.
123119

124120
**Parameters**
125121

126-
- `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to unregister `handler` from, or `"*"`
127-
- `handler` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove
122+
- `type` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to unregister `handler` from, or `"*"`
123+
- `handler` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove
124+
125+
### emit
126+
127+
Invoke all handlers for the given type.
128+
If present, `"*"` handlers are invoked after type-matched handlers.
129+
130+
**Parameters**
131+
132+
- `type` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The event type to invoke
133+
- `evt` **Any?** Any value (object is recommended and powerful), passed to each handler
128134

129135
## Contribute
130136

0 commit comments

Comments
 (0)