Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
express-jsonstream
Advanced tools
Simple middleware for JSON streaming in Express. Stringifys and sends object delimited by \n
's with the Content-Type : application/jsonstream
header
var jsonStream = require('express-jsonstream');
var express = require('express');
var app = express.createServer(jsonStream());
app.get('/stream-yo', function(req, res) {
res.jsonStream({small:'world'});
res.jsonStream({after:'all'});
res.end();
});
app.listen(8553);
console.log('listening on', 8553);
You can run the example with:
node example
a GET to /stream-yo:
curl "http://localhost:8553/stream-yo" -G -v
* About to connect() to localhost port 8553 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8553 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8553
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Powered-By: Express
< content-type: application/jsonstream
< Connection: keep-alive
< Transfer-Encoding: chunked
<
{"small":"world"}
{"after":"all"}
* Connection #0 to host localhost left intact
* Closing connection #0
FAQs
Simple middleware for JSON streaming in Express
The npm package express-jsonstream receives a total of 0 weekly downloads. As such, express-jsonstream popularity was classified as not popular.
We found that express-jsonstream 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.