Skip to content

jshkurti/tiny-ee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 25, 2015
dc9f7be · Jun 25, 2015

History

5 Commits
Jun 23, 2015
Jun 24, 2015
Jun 25, 2015
Jun 25, 2015

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