RunKit + npm: mitt

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