eventemitter-decorator

0.1.2 • Public • Published

EventEmitterDecorator

build status npm version

USAGE

import EventEmitter from 'eventemitter-decorator';
 
@EventEmitter
class Foo {}
 
const foo = new Foo();
foo.on('hello', (name) => console.log(`hello, ${name}!!`));
 
foo.emit('hello', 'world');  // 'hello, world!!'

Readme

Keywords

none

Package Sidebar

Install

npm i eventemitter-decorator

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • fand