RSVP lib has a hash of promises helper that allows to "retrieve" promises references:
var promises = {
posts: getJSON("/posts.json"),
users: getJSON("/users.json")
};
RSVP.hash(promises).then(function(results) {
console.log(results.users) // print the users.json results
console.log(results.posts) // print the posts.json results
});
Is there a way to do such a thing with vanilla promises (in modern ES)?