We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5363bf0 commit 53a44d8Copy full SHA for 53a44d8
src/index.js
@@ -16,7 +16,6 @@ export default function mitt(all) {
16
*/
17
on(type, handler) {
18
(all[type] || (all[type] = [])).push(handler);
19
- return ret;
20
},
21
22
/**
@@ -30,7 +29,6 @@ export default function mitt(all) {
30
29
off(type, handler) {
31
let e = all[type] || (all[type] = []);
32
e.splice(e.indexOf(handler) >>> 0, 1);
33
34
35
36
@@ -45,7 +43,6 @@ export default function mitt(all) {
45
43
emit(type, evt) {
46
44
(all[type] || []).map((handler) => { handler(evt); });
47
(all['*'] || []).map((handler) => { handler(type, evt); });
48
49
}
50
};
51
0 commit comments