diff options
| -rw-r--r-- | example.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/example.js b/example.js deleted file mode 100644 index e54bb54..0000000 --- a/example.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict' - -var mitt = require('./dist/mitt') -var ee = mitt() - -ee - .on('*', (type, arg) => console.log('wildcard:', type, arg)) - .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) - -var emitter = mitt() - -console.log(emitter.all) // => {} - -emitter.emit('foo', 777) |
