Node.js · Senior · Question 25 of 75
How do Node.js streams interoperate with Web Streams (ReadableStream)?
- 1They can't be converted
- ✓Correct answer: With
Readable.toWeb()/Readable.fromWeb()(and similar for Writable);fetchbodies are Web Streams - 3They are the same objects
Explanation
Web Streams are the standard across runtimes (browsers, Deno, Bun, edge). Node streams are still common in older APIs, so conversion is often needed.