Package Exports
- sparkles
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 (sparkles) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
sparkles
Namespaced global event emitter
Usage
Sparkles exports a function that returns a singleton EventEmitter
.
This EE can be shared across your application, whether or not node loads
multiple copies.
var sparkles = require('sparkles')(); // make sure to call the function
sparkles.on('my-event', function(evt){
console.log('my-event handled', evt);
});
sparkles.emit('my-event', { my: 'event' });
License
MIT