
Security News
Open VSX Unblocks Extension IDs Used in Malware Campaign
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.
stream-to-value
Advanced tools
Consume a Web ReadableStream into a string, Uint8Array, JSON object, or array of chunks
Consume a Web ReadableStream into a string, Uint8Array, JSON object, or array of chunks
npm install stream-to-value
import {streamToString, streamToJson} from 'stream-to-value';
const response = await fetch('https://example.com/api');
const text = await streamToString(response.body);
console.log(text);
const response2 = await fetch('https://example.com/api/data');
const data = await streamToJson(response2.body);
console.log(data);
Consume a ReadableStream into a string. Handles both string and Uint8Array chunks.
Returns a Promise<string>.
Type: ReadableStream
The stream to consume.
Consume a ReadableStream into a single Uint8Array.
Returns a Promise<Uint8Array>.
Type: ReadableStream
The stream to consume.
Consume a ReadableStream and parse the content as JSON.
Returns a Promise<unknown>.
Type: ReadableStream
The stream to consume.
Consume a ReadableStream into an array of chunks.
Returns a Promise<unknown[]>.
Type: ReadableStream
The stream to consume.
MIT
FAQs
Consume a Web ReadableStream into a string, Uint8Array, JSON object, or array of chunks
We found that stream-to-value 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.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.