From 65274bb7c8b25b3a26149c7c309d45950e0bd3f7 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Mon, 27 Feb 2017 21:41:46 -0500 Subject: chore(*): remove example.js from root (#37) Thinking this might be better in the readme anyway, or in a `docs/` dir. I'd like to get rid of any unnecessary files in the root. --- example.js | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 example.js 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) -- cgit v1.2.3