firebase.js is SO DAMN HUGE!
Roman Dubinin

Interesting read. A quick note on your timeout implementation: I think you’ll want Promise.race, not <a promise>.then. Currently the timeout rejection won’t fire until the first Promise is fulfilled. e.g.

// deadline will always reject, but hopefully after the race 
// finishes
let deadline = new Promise((resolve, reject) => {
setTimeout(() => reject('Timeout'), timeoutTime);
return Promise.race([promise, deadline]);
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.