How to use the promises function from async
Find comprehensive JavaScript async.promises code examples handpicked from public code repositorys.
GitHub: efoxbr/megacubo
221 222 223 224 225 226 227 228 229 230
rmLists.forEach(u => this.remove(u)) newLists.forEach(u => this.syncLoadList(u)) } async isListCached(url){ let err, file = global.storage.raw.resolve(LIST_DATA_KEY_MASK.format(url)) const stat = await fs.promises.stat(file).catch(e => err = e) return (stat && stat.size >= 1024) } async filterCachedUrls(urls){ if(this.debug) console.log('filterCachedUrls', urls.join("\r\n"))
+ 2 other calls in file
async.parallel is the most popular function in async (1226 examples)