Skip to content

Instantly share code, notes, and snippets.

@pulponair
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pulponair/27de08cb590d138af816 to your computer and use it in GitHub Desktop.
Save pulponair/27de08cb590d138af816 to your computer and use it in GitHub Desktop.
var deferred = {},
if (data.picture) {
deferred.picture = webservices.image(data['picture']);
}
if (data.screen) {
deferred.screen = webservices.image(data['screen']);
}
if (data.screens) {
data.screens.forEach(function() {
???
})
}
when.keys(deferred).then(
function(deferred) {
console.log(deferred.picture);
console.log(deferred.screen);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment