0.0.2 • Published 9 years ago

async-executor v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

#How to install

node install async-executor

#How to initialize

var Executor = require('async-executor');

function MyClass(){
}

MyClass.prototype.doSomething=function(){
    var executor=new Executor();
    executor.result(null, {success: true}); // call if success
    //executor.result({error: true}, null); // call if error
    return executor;
};

#How to use

var obj=new MyClass();
obj.doSomething().success(function(data){}).error(function(error){});
0.0.2

9 years ago

0.0.1

9 years ago