
Research
/Security News
Compromised npm Packages in the AsyncAPI Namespace Deliver Miasma Botnet Loader
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.
async-iterator-from-rx
Advanced tools
A tool to convert RxJS style observable stream asyncGenerator.
RxJS is not so common compare with async/await and it's hard to learn. This tool can help user who is not so familiar with observable to use observables in async/await way.
npm i -S rx-from-async-iterator tslib rxjs
For example, we need to collect 10 user touch points when in some case. And we've already have a click stream. Use asyncIteratorFromRx to convert stream to asyncIterator so that you can use for await ... of syntax to process the stream signal.
import { asyncIteratorFromRx } from "async-iterator-from-rx";
import { fromEvent } from "rxjs";
const click$ = fromEvent("pointerdown", document.body); // A click stream.
async function batchCollectByCount(count: number) {
const clickTrace: Array<[x: number, y: number]> = [];
const clickIterator = asyncIteratorFromRx(click$); // Convert click stream to an asyncIterator
for await (const evt of clickIterator) {
// use `for await ... of` to scan the click stream
clickTrace.push([evt.x, evt.y]);
if (clickTrace.length === count) {
break;
}
}
return clickTrace;
}
batchCollectByCount(10).then(uploadClickTrace);
FAQs
A tool to convert RxJS style observable stream asyncGenerator
We found that async-iterator-from-rx 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.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.