Created
November 5, 2022 14:24
-
-
Save vitaly-t/de30ca8676570570a8577ce9313bf968 to your computer and use it in GitHub Desktop.
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
import {pipeAsync, map, waitRace, delay} from 'iter-ops'; | |
const i = pipeAsync( | |
[1, 2, 3], | |
map(s => Promise.resolve(s * 10)), | |
delay(100), | |
waitRace(3) | |
); | |
(async function () { | |
for await (const a of i) { | |
console.log(a); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment