MCPcopy
hub / github.com/BrainJS/brain.js / afterWrite

Function afterWrite

browser.js:25347–25352  ·  view source on GitHub ↗
(stream, state, finished, cb)

Source from the content-addressed store, hash-verified

25345}
25346
25347function afterWrite(stream, state, finished, cb) {
25348 if (!finished) onwriteDrain(stream, state);
25349 state.pendingcb--;
25350 cb();
25351 finishMaybe(stream, state);
25352}
25353
25354// Must force callback to be called on nextTick, so that we don't
25355// emit 'drain' before the write() consumer gets the 'false' return

Callers 1

onwriteFunction · 0.70

Calls 3

cbFunction · 0.85
onwriteDrainFunction · 0.70
finishMaybeFunction · 0.70

Tested by

no test coverage detected