Created
July 8, 2015 09:17
-
-
Save wei-lee/98ad544bbfbead121955 to your computer and use it in GitHub Desktop.
create variants
This file contains hidden or 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
async.waterfall( | |
[ | |
function getVariants(callback){ | |
//get variants, pass them to the callback | |
return callback(null, variants); | |
}, | |
function(variants, callback){ | |
//if variants is an array, you can nest more async functions | |
async.map(variants, function(variant, cb){ | |
//create variant | |
cb(null, result); | |
}, callback); | |
}, | |
function(results, callback){ | |
//at this point, you will have all the results, you can send them back to millicore | |
return callback(); | |
} | |
], function(err){ | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment