p-break:突破承诺链

时间:2021-05-01 07:38:17
【文件属性】:
文件名称:p-break:突破承诺链
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-01 07:38:17
JavaScript p-break 突破承诺链 请参阅 更好的方法。 安装 $ npm install p-break 用法 如果conditional为假,则将跳过onlyRunConditional承诺: import pBreak from 'p-break' ; alwaysRun1 ( ) . then ( ( ) => alwaysRun2 ( ) ) . then ( conditional => conditional || pBreak ( ':unicorn:' ) ) . then ( ( ) => onlyRunConditional1 ( ) ) . then ( ( ) => onlyRunConditional2 ( ) ) . then ( ( ) => onlyRunConditional3 ( ) ) . then ( ( ) => onlyRunConditional4
【文件预览】:
p-break-main
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(526B)
----license(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(302B)
----readme.md(1KB)
----package.json(748B)

网友评论