promise all execute

var a = () => Promise.resolve(1);
var b = () => Promise.reject(new Error(2));
var c = () => Promise.resolve(3);

Promise.all([a(), b(), c()].map(p => p.catch(e => e)))
.then(results => console.log(results)) // 1,Error: 2,3
.then*1
.then(results => alert('a'))
.catch(e => console.log(e));

stackoverflow.com

 

stackoverflow.com

*1:) => Promise.all([a(), b(), c()].map(p => p.catch(e => e)))) // 1,Error: 2,3
.then(results => console.log(results

interested

Webエンジニアに知ってほしいRDBアンチパターン // Speaker Deck

 

cybozu.comの認証 / cybozu.com authentication // Speaker Deck

 

カヤックのゲーム開発・運用の「今」 力技と効率化の先に我々が目にしたものとは / YAPC Kansai 2017 Development of the Bokura No Koshien Pocket // Speaker Deck