@tbnritzdoge/events
v1.0.6
Published
very fast events
Downloads
7
Readme
@tbnritzdoge/events
usage
nodejs
import EventEmitter from '@tbnritzdoge/events';
const emitter = new EventEmitter();
emitter.on('cheese', (gluten) => {
if (Array.isArray(gluten) === true) gluten[gluten.length] = gluten[0];
});
emitter.emit('cheese', ['a', 'b', 'c']);
deno
import EventEmitter from 'https://unpkg.com/@tbnritzdoge/[email protected]/dist/index.js';
const emitter = new EventEmitter();
emitter.on('cheese', (gluten) => {
if (Array.isArray(gluten) === true) gluten[gluten.length] = gluten[0];
});
emitter.emit('cheese', ['a', 'b', 'c']);
benchmarks
drip x 532,799 ops/sec ±1.29% (291 runs sampled)
@tbnritzdoge/events x 1,419,332 ops/sec ±0.32% (293 runs sampled)
native x 1,095,307 ops/sec ±0.59% (290 runs sampled)
eventemitter3 x 513,031 ops/sec ±0.21% (292 runs sampled)