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

Function isDestroyed

lib/internal/streams/utils.js:120–126  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

118}
119
120function isDestroyed(stream) {
121 if (!isNodeStream(stream)) return null;
122 const wState = stream._writableState;
123 const rState = stream._readableState;
124 const state = wState || rState;
125 return !!(stream.destroyed || stream[kIsDestroyed] || state?.destroyed);
126}
127
128// Have been end():d.
129function isWritableEnded(stream) {

Callers 6

destroyerFunction · 0.70
isReadableFunction · 0.70
isWritableFunction · 0.70
isFinishedFunction · 0.70

Calls 1

isNodeStreamFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…