Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: mitt
node v4.9.1
endpoint
share
tweet
const mitt = require("mitt") let emitter = mitt() emitter.on('foo', e => console.log('1') ) emitter.on('foo', e => {throw new Error('oops')}) emitter.on('foo', e => console.log('2') ) emitter.emit('foo', { a: 'b' });
Created from: https://runkit.com/npm/mitt
Loading…
no comments
sign in
to comment