by shaohua on 5/21/14, 4:44 PM with 1 comments
by shaohua on 5/21/14, 4:50 PM
https://github.com/facebook/react/blob/master/examples/todom...
waitFor: function(/array/ promiseIndexes, /function/ callback) {
var selectedPromises = _promises.filter(function(/*object*/ _, /*number*/ j) {
return promiseIndexes.indexOf(j) !== -1;
});
Promise.all(selectedPromises).then(callback);
}