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

Method write

lib/internal/streams/iter/push.js:567–575  ·  view source on GitHub ↗
(chunk, options)

Source from the content-addressed store, hash-verified

565 }
566
567 write(chunk, options) {
568 if (!options?.signal && this.#queue.canWriteSync()) {
569 const bytes = toUint8Array(chunk);
570 this.#queue.writeSync([bytes]);
571 return kResolvedPromise;
572 }
573 const bytes = toUint8Array(chunk);
574 return this.#queue.writeAsync([bytes], options?.signal);
575 }
576
577 writev(chunks, options) {
578 if (!ArrayIsArray(chunks)) {

Callers 15

ondataFunction · 0.45
readable.jsFile · 0.45
ondataFunction · 0.45
pumpToNodeFunction · 0.45
pumpToWebFunction · 0.45
pipelineImplFunction · 0.45
compose.jsFile · 0.45
_duplexifyFunction · 0.45
writeChunksFunction · 0.45
writeFunction · 0.45

Calls 4

toUint8ArrayFunction · 0.85
canWriteSyncMethod · 0.80
writeAsyncMethod · 0.80
writeSyncMethod · 0.45

Tested by

no test coverage detected