aboutsummaryrefslogtreecommitdiff
path: root/example.js
diff options
context:
space:
mode:
Diffstat (limited to 'example.js')
-rw-r--r--example.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/example.js b/example.js
index f8c52d5..e54bb54 100644
--- a/example.js
+++ b/example.js
@@ -5,10 +5,10 @@ var ee = mitt()
ee
.on('*', (type, arg) => console.log('wildcard:', type, arg))
- .on('foo', (one, two, three) => console.log('foo1:', one, two, three))
- .on('foo', (one, two, three) => console.log('foo2:', one, two, three))
- .on('bar', (arg) => console.log('bar:', arg))
- .emit('foo', 1, 2, 3)
+ .on('foo', (one, c) => console.log('foo1:', one)) // => 1
+ .on('foo', (one) => console.log('foo2:', one)) // => 1
+ .on('bar', (arg) => console.log('bar:', arg)) // => 444
+ .emit('foo', 1, 2, 3) // we not support multiple arguments
.emit('bar', 444)
console.log(ee.all)