Skip to content

Instantly share code, notes, and snippets.

@chris--young
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris--young/62a291dd274e11be0c92 to your computer and use it in GitHub Desktop.
Save chris--young/62a291dd274e11be0c92 to your computer and use it in GitHub Desktop.
function linkGiftCards(giftCards, customerId, callback) {
function linkCard(card, id, callback2) {
// do some stuff
callback2();
}
async.each(giftCards, function (card, callback2) {
linkCard(card, customerId, callback2);
}, function (err) {
if (err)
log.info('>>> Completed looking up 10 gift cards as anonymous uer')
callback();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment