0.4.2 • Published 9 years ago
@elishacook/simple-events v0.4.2
SimpleEvents
.on
, .off
, .once
, etc. Have a look at the unit tests for usage examples.
Can be easily used as a mixin:
var SimpleEvents = require('simple-events')
var FooBar = function ()
{
SimpleEvents.mixin(this)
}
var foobar = new FooBar()
foobar.on('stuff', function (x) { console.log(x + 10) })
foobar.emit('stuff', 10) // 20
Install
You can install using npm.
npm install @elishacook/simple-events