Created
June 9, 2020 08:05
-
-
Save Richienb/af74263ea6f94ef399d402505fc49466 to your computer and use it in GitHub Desktop.
p-spread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pSpread = require("p-spread") | |
pSpread(Promise.resolve([1, 2]), console.log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = async (promise, iterator) => iterator(...await promise) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment