MCPcopy Create free account
hub / github.com/nodejs/undici / createReadable

Function createReadable

test/utils/stream.js:5–12  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

3const { Readable, Writable } = require('node:stream')
4
5function createReadable (data) {
6 return new Readable({
7 read () {
8 this.push(Buffer.from(data))
9 this.push(null)
10 }
11 })
12}
13
14function createWritable (target) {
15 return new Writable({

Callers 4

redirect-stream.jsFile · 0.85
redirect.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected