0.1.7-alpha.7 • Published 8 months ago

@infinitylist/emitter v0.1.7-alpha.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@infinitylist/emitter

Event emitter that creates types based off of an interface


Usage Example

More examples and documentation coming soon

Node

const { EventEmitter } = require("@infinitybots/emitter");

const ee = new EventEmitter();

ee.on('message', function(text) {
    console.log(text);
});

ee.on('error', function(err) {
    console.error(`Emitter test failed: ${err.stack}`);
})

ee.emit('message', 'Emitter tests complete');

ES6

import { EventEmitter } from "@infinitybots/emitter";

const ee = new EventEmitter();

ee.on('message', function(text) {
    console.log(text);
});

ee.on('error', function(err) {
    console.error(`Emitter test failed: ${err.stack}`);
})

ee.emit('message', 'Emitter tests complete');
0.1.7-alpha.7

8 months ago

0.1.7-alpha.6

9 months ago

0.1.6

9 months ago

0.1.0

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago