MCPcopy Index your code
hub / github.com/nodejs/node / newCrossRealmWritableSink

Function newCrossRealmWritableSink

lib/internal/webstreams/transfer.js:290–304  ·  view source on GitHub ↗
(readable, port)

Source from the content-addressed store, hash-verified

288}
289
290function newCrossRealmWritableSink(readable, port) {
291 // MessagePort should always be unref.
292 // There is a problem with the process not terminating.
293 // https://github.com/nodejs/node/issues/44985
294 const writable = new WritableStream(new CrossRealmTransformWritableSink(port, false));
295
296 const promise = readableStreamPipeTo(readable, writable, false, false, false);
297
298 setPromiseHandled(promise);
299
300 return {
301 writable,
302 promise,
303 };
304}
305
306module.exports = {
307 newCrossRealmReadableStream,

Callers

nothing calls this directly

Calls 2

readableStreamPipeToFunction · 0.85
setPromiseHandledFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…