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

Function watchClosed

lib/internal/webstreams/readablestream.js:1593–1598  ·  view source on GitHub ↗
(stream, promise, action)

Source from the content-addressed store, hash-verified

1591 }
1592
1593 function watchClosed(stream, promise, action) {
1594 if (stream[kState].state === 'closed')
1595 action();
1596 else
1597 PromisePrototypeThen(promise, action, () => {});
1598 }
1599
1600 async function step() {
1601 if (shuttingDown) return true;

Callers 1

readableStreamPipeToFunction · 0.85

Calls 1

actionFunction · 0.85

Tested by

no test coverage detected