MCPcopy Index your code
hub / github.com/BrainJS/brain.js / onwriteDrain

Function onwriteDrain

browser.js:25357–25362  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

25355// emit 'drain' before the write() consumer gets the 'false' return
25356// value, and has a chance to attach a 'drain' listener.
25357function onwriteDrain(stream, state) {
25358 if (state.length === 0 && state.needDrain) {
25359 state.needDrain = false;
25360 stream.emit('drain');
25361 }
25362}
25363
25364// if there's something in the buffer waiting, then process it
25365function clearBuffer(stream, state) {

Callers 1

afterWriteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected