Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.