3 ms·
Using a library like Bluebird couldn't you simply write and get the exact behavior intended? async function renderChapters(urls) { Promise.map(urls
by Akkuma 11y ago
Using a library like Bluebird couldn't you simply write and get the exact behavior intended?
async function renderChapters(urls) {
Promise.map(urls, getJSON).each(j => j.html));
}
or
async function renderChapters(urls) {
var chapters = await Promise.map(urls, getJSON);
chapters.forEach(j => j.html);
}