Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
aggregate-async-iterator
Advanced tools
Readme
Aggregates several async iterators into one (zip)
import { aggregateRoundRobin, aggregateFifo } from "aggregate-async-iterator";
async function* sequence(name, time = 100, num = 10) {
for (let i = 0; i < num; i += 1) {
yield new Promise(resolve => setTimeout(resolve(name + i), time));
}
}
console.log("RR:");
for await (const r of aggregateRoundRobin([
sequence("A", 100, 3),
sequence("B", 35, 5)
])) {
console.log(r);
}
console.log("FIFO:");
for await (const r of aggregateFifo([
sequence("A", 100, 3),
sequence("B", 35, 5)
])) {
console.log(r);
}
Prints interleaved sequences
RR:
A0
B0
A1
B1
A2
B2
B3
B4
FIFO:
A0
B0
A1
B1
A2
B2
B3
B4
Aggregate items from sevaral async iterators into one. Items are collected first in first out from the sources. Whatever source comes first will be delivered first.
sources
Array<AsyncIterator<any>> Returns AsyncIterable<any> items collected from all sources
Aggregate items from sevaral async iterators into one. Items are collected round robin from the sources. The 2nd. round of items will only be delivered after all sources have delivered their 1st. round (or reached their end).
sources
Array<AsyncIterator<any>> Returns AsyncIterable<any> items collected from all sources
With npm do:
npm install aggregate-async-iterator
BSD-2-Clause
FAQs
Aggregates several async iterators into one (zip)
The npm package aggregate-async-iterator receives a total of 918 weekly downloads. As such, aggregate-async-iterator popularity was classified as not popular.
We found that aggregate-async-iterator demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.