Package Exports
- emmy
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (emmy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Emmy
An event emitter with target events harness: jQuery, DOM events, Backbone or any other EventEmitter interface, if implemented. If isn’t - uses own events.
Use
$ npm install emmyvar Emmy = require('emmy');
//Hand emmy to someone
var someone.prototype = Object.create(Emmy);
someone
//Bind events
.on('event', handler)
.on('otherEvent', handler)
.on('event2', [handler1, handler2]) //bind list of handlers
//Unbind events
.off('event', handler)
.off('otherEvent') //unbind all 'otherEvent' callbacks
.off('event2', [handler1, handler2]); //unbind list of handlers
.off(target) //unbind all events
//Emit events
.emit('a')
.emit('b', data, bubbles);TODO
- Add testling table
License
MIT