Created
April 6, 2016 11:33
-
-
Save shaikh-shahid/3cea069264f9179e021dc1943a6541d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'); | |
async.waterfall([ | |
function(callback) { | |
// some code to execute | |
// in case to go to next function provide callback like this. | |
callback(null,valueForNextFunction); | |
// Got some error ? Don't wanna go further. | |
// Provide true in callback and execution will stop. | |
//callback(true,"Some error"); | |
}, | |
function(parameterValue,callback) { | |
// Some code to execute. | |
callback(null,"Some data"); | |
} | |
],function(err,data) { | |
// Code to execute after everything is done. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment