p-each-series:依次遍历Promise

时间:2021-04-30 20:39:06
【文件属性】:
文件名称:p-each-series:依次遍历Promise
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-30 20:39:06
JavaScript p-每个系列 依次遍历Promise 用作副作用迭代器。 如果不需要副作用,则最好使用 ,因为它是并发的。 安装 $ npm install p-each-series 用法 import pEachSeries from 'p-each-series' ; const keywords = [ getTopKeyword ( ) , //=> Promise 'rainbow' , 'pony' ] ; const iterator = async element => saveToDiskPromise ( element ) ; console . log ( await pEachSeries ( keywords , iterator ) ) ; //=> ['unicorn', 'rainbow', 'pony'] 原料药 pEachSeries(输入,迭代器) 返回
【文件预览】:
p-each-series-main
----.gitignore(23B)
----package.json(863B)
----.npmrc(19B)
----index.js(368B)
----test.js(1KB)
----.github()
--------workflows()
----license(1KB)
----readme.md(2KB)
----index.test-d.ts(506B)
----.gitattributes(19B)
----.editorconfig(175B)
----index.d.ts(1KB)

网友评论