Convert a Stream to an async iterator
import { stream } from "@rjweb/utils"import * as fs from "fs"const readStream = fs.createReadStream('./file.txt')for await (const chunk of stream.iterator<Buffer>(readStream)) { console.log(chunk.toString())} Copy
import { stream } from "@rjweb/utils"import * as fs from "fs"const readStream = fs.createReadStream('./file.txt')for await (const chunk of stream.iterator<Buffer>(readStream)) { console.log(chunk.toString())}
1.9.0
nodejs, browser
Convert a Stream to an async iterator