Skip to content

Commit 6a9154a

Browse files
author
tunnckoCore
committed
update example.js
1 parent 02ea47f commit 6a9154a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ var ee = mitt()
55

66
ee
77
.on('*', (type, arg) => console.log('wildcard:', type, arg))
8-
.on('foo', (one, two, three) => console.log('foo1:', one, two, three))
9-
.on('foo', (one, two, three) => console.log('foo2:', one, two, three))
10-
.on('bar', (arg) => console.log('bar:', arg))
11-
.emit('foo', 1, 2, 3)
8+
.on('foo', (one, c) => console.log('foo1:', one)) // => 1
9+
.on('foo', (one) => console.log('foo2:', one)) // => 1
10+
.on('bar', (arg) => console.log('bar:', arg)) // => 444
11+
.emit('foo', 1, 2, 3) // we not support multiple arguments
1212
.emit('bar', 444)
1313

1414
console.log(ee.all)

0 commit comments

Comments
 (0)