aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortunnckoCore <[email protected]>2017-01-18 02:46:34 +0200
committertunnckoCore <[email protected]>2017-01-18 02:46:34 +0200
commit6a9154a72861a4c83c4a6028ee722f9ff1dfd1d2 (patch)
treee8182529d39dbd2208d67d201afe704a571620ba
parent02ea47f0dc4649d3adbfb32fd1b458fe2b8aa3d8 (diff)
update 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)