Skip to content

Instantly share code, notes, and snippets.

@raine
Created June 11, 2013 22:06
Show Gist options
  • Select an option

  • Save raine/5761172 to your computer and use it in GitHub Desktop.

Select an option

Save raine/5761172 to your computer and use it in GitHub Desktop.
var callback = function() {
if _.every(_.pluck(arr, 'resolved')) {
console.log('all resolved');
}
};
var arr = models.map(function(m) {
return m.destroy().then(callback);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment