Skip to content

jshkurti/tiny-ee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tiny-ee

The smallest event emitter for Node.js

Install

npm install tiny-ee

Use

var Emitter = require('tiny-ee');
var emitter = new Emitter();

emitter.on('itworks', console.log);

emitter.once('itworks', function() {
  console.log('I will die after this');
});

emitter.emit('itworks', 'yep');


// More methods
emitter.removeListener('itworks', console.log);
emitter.addListener('itworks', console.log);
emitter.removeAllListeners('itworks');
console.log(emitter.listeners('itworks'));

License

MIT

About

The smallest event emitter for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published