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

Function isWritableFinished

lib/internal/streams/utils.js:139–149  ·  view source on GitHub ↗
(stream, strict)

Source from the content-addressed store, hash-verified

137
138// Have emitted 'finish'.
139function isWritableFinished(stream, strict) {
140 if (!isWritableNodeStream(stream)) return null;
141 if (stream.writableFinished === true) return true;
142 const wState = stream._writableState;
143 if (wState?.errored) return false;
144 if (typeof wState?.finished !== 'boolean') return null;
145 return !!(
146 wState.finished ||
147 (strict === false && wState.ended === true && wState.length === 0)
148 );
149}
150
151// Have been push(null):d.
152function isReadableEnded(stream) {

Callers 2

getEosOnCloseErrorFunction · 0.85
eosFunction · 0.85

Calls 1

isWritableNodeStreamFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…