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

Function isFinished

lib/internal/streams/utils.js:191–209  ·  view source on GitHub ↗
(stream, opts)

Source from the content-addressed store, hash-verified

189}
190
191function isFinished(stream, opts) {
192 if (!isNodeStream(stream)) {
193 return null;
194 }
195
196 if (isDestroyed(stream)) {
197 return true;
198 }
199
200 if (opts?.readable !== false && isReadable(stream)) {
201 return false;
202 }
203
204 if (opts?.writable !== false && isWritable(stream)) {
205 return false;
206 }
207
208 return true;
209}
210
211function isWritableErrored(stream) {
212 if (!isNodeStream(stream)) {

Callers 1

destroyerFunction · 0.85

Calls 4

isNodeStreamFunction · 0.85
isReadableFunction · 0.85
isDestroyedFunction · 0.70
isWritableFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…