
Research
PyPI Package Impersonates SymPy to Deliver Cryptomining Malware
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.
Write to koa bodies in generator style, respecting back pressure and throwing on closed sockets.
var koa = require('koa');
var co = require('co');
var write = require('koa-write');
var PassThrough = require('stream').PassThrough;
var wait = require('co-wait');
var app = koa();
app.use(function(){
var ctx = this;
ctx.body = PassThrough();
co(function*(){
for (var i = 0; i < 100; i++) {
yield write(ctx, Date.now().toString());
}
}, this.onerror);
});
Write chunk to ctx.
Yields as soon as you're good to write more.
Throws when the socket is already closed, so it doesn't make sense to write more.
co-write writes to streams and
does the same http socket handling, however it expects to be passed an http
response object for that to work. In the situation where you have
stream.pipe(res) you'll want to write to stream, however end when
res.socket ends.
$ npm install koa-write
MIT
FAQs
Write to koa bodies in generator style
The npm package koa-write receives a total of 1 weekly downloads. As such, koa-write popularity was classified as not popular.
We found that koa-write 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
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.