octopus:简洁的异步任务助手

章鱼/\  ∠___ゝ   )|’ー’| /  (ノノノ从し' 弃用注意:不推荐使用此软件包。如果您需要执行异步任务,应使用Promise和/或async/await语法,这些语法在所有现代浏览器及最新版本的node.js中均适用。您可以本地实现与章鱼相同的效果:const results = await Promise.all([one(), two()]); 或 const [result1, result2] = await Promise.all([one(), two()]); 异步任务:const calls = [one, two, three]; let value; for (const call of calls) { value = await call(); }
zip 文件大小:32.47KB