Open this example in the interactive library
Source code
import { Readable } from "node:stream";
import { text } from "node:stream/consumers";
console.log(await text(Readable.from(["one", "two"])));
Sample output
onetwo

Open this example in the interactive library
import { Readable } from "node:stream";
import { text } from "node:stream/consumers";
console.log(await text(Readable.from(["one", "two"])));
onetwo