conclude
v0.1.5
Published
Conclude is an event-notifyer
Downloads
15
Readme
Run callbacks when all of loadings occured.
conclude.on('mysql mongo memcache', function(){
console.log('Ready A')
});
conclude.on(['mysql', 'mongo', 'memcache'], function(){
console.log('Ready B')
});
conclude.on('mysql', 'mongo', 'memcache', function(){
console.log('Ready C')
});
var ready = conclude.getReady();
var memcacheReady = conclude.getReady('memcache');
process.nextTick(function(){
// Notify conclude
conclude.ready('mysql');
// Notify with closure
ready('mongo');
// Notify with strict closure
memcacheReady();
}, 3000 * Math.random());