【发布时间】:2019-11-04 16:17:42
【问题描述】:
我有这样的管道:
S.pipe([
getRequestFile, // not async
S.chain(saveTemporary), // not async
S.chain(copyImageToPublicPath), // async
S.chain(copyFileToPath), // async
S.chain(someLoggingFunction), // not async
S.chain(sendResponse), // not async
]);
此管道中间有 2 个异步函数。
我想await for copyImageToPublicPath 然后await for copyFileToPath 然后继续正常流程
经过一番搜索,我发现有Future.tryP 函数用于执行async,但我如何在此管道中间使用Fluture?
【问题讨论】:
标签: javascript functional-programming sanctuary fluture