Extends native Promise by helpful methods
npm install ext-promise
let ExtPromise = require('ext-promise');
ExtPromise
.all({
result1: 1,
result2: Promise.resolve(2),
result3: new Promise(resolve =>
setTimeout(() => resolve(3), 100)
)
})
.then(results => console.log(results)); // { result1: 1, result2: 2, result3: 3 }
.all(Array collection|Object hash) -> Promise.<Array|Object>
Extended static method Promise.all
. New method enters object parameter