Skip to content

Instantly share code, notes, and snippets.

@eastridge
Created February 3, 2013 03:52
Show Gist options
  • Save eastridge/4700488 to your computer and use it in GitHub Desktop.
Save eastridge/4700488 to your computer and use it in GitHub Desktop.
var async = require('async'),
_ = require('underscore');
var obj = {
key: 'value'
};
async.series(_.map(obj, function(value, key) {
return function(next) {
$.ajax({
complete: function() {
next();
}
})
};
}))
async.series([
function(next) {
$.ajax({
complete: function() {
next();
}
})
},
function(next) {
$.ajax({
complete: function() {
next();
}
})
}
], function(complete) {
$.ajax({
complete: complete
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment