MCPcopy Create free account
hub / github.com/BrainJS/brain.js / doWrite

Function doWrite

browser.js:25282–25289  ·  view source on GitHub ↗
(stream, state, writev, len, chunk, encoding, cb)

Source from the content-addressed store, hash-verified

25280}
25281
25282function doWrite(stream, state, writev, len, chunk, encoding, cb) {
25283 state.writelen = len;
25284 state.writecb = cb;
25285 state.writing = true;
25286 state.sync = true;
25287 if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
25288 state.sync = false;
25289}
25290
25291function onwriteError(stream, state, sync, er, cb) {
25292 --state.pendingcb;

Callers 2

writeOrBufferFunction · 0.70
clearBufferFunction · 0.70

Calls 1

_writeMethod · 0.80

Tested by

no test coverage detected