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

Function ondata

lib/internal/streams/readable.js:1021–1033  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

1019
1020 src.on('data', ondata);
1021 function ondata(chunk) {
1022 debug('ondata');
1023 try {
1024 const ret = dest.write(chunk);
1025 debug('dest.write', ret);
1026
1027 if (ret === false) {
1028 pause();
1029 }
1030 } catch (error) {
1031 dest.destroy(error);
1032 }
1033 }
1034
1035 // If the dest has an error, then stop piping into it.
1036 // However, don't suppress the throwing behavior for this.

Callers

nothing calls this directly

Calls 4

pauseFunction · 0.70
debugFunction · 0.50
writeMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…