Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
merge-async-iterators
Advanced tools
A simple async iterators merger
Requires ES2018 Async Iteration
npm i merge-async-iterators
merge([...iterators], opts)
iterators
Array of async iterables
opts
yieldIterator[=false]
Yields {iterator, data: {value, done}}
(instead of just value
)
Useful if you wanna know which iterator yielded the value
Returns A single merged async iterable
const merge = require('merge-async-iterators');
async function* a () {
yield 'a1'
yield 'a2'
return 'a3'
}
async function* b () {
yield 'b1'
yield 'b2'
return 'b3'
}
for await (const value of merge([a(), b()])) {
console.log(value)
}
a1
b1
a2
b2
a3
b3
FAQs
Merge multiple async iterators
We found that merge-async-iterators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.