Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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!!'

Keywords

none

install

npm i eventemitter-decorator

Downloadsweekly downloads

1

version

0.1.2

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar