MCPcopy Create free account
hub / github.com/nodejs/node / writevSync

Method writevSync

lib/internal/streams/iter/broadcast.js:607–621  ·  view source on GitHub ↗
(chunks)

Source from the content-addressed store, hash-verified

605 }
606
607 writevSync(chunks) {
608 if (!ArrayIsArray(chunks)) {
609 throw new ERR_INVALID_ARG_TYPE('chunks', 'Array', chunks);
610 }
611 if (this.#isClosedOrAborted()) return false;
612 if (!this.#broadcast[kCanWrite]()) return false;
613 const converted = convertChunks(chunks);
614 if (this.#broadcast[kWrite](converted)) {
615 for (let i = 0; i < converted.length; i++) {
616 this.#totalBytes += TypedArrayPrototypeGetByteLength(converted[i]);
617 }
618 return true;
619 }
620 return false;
621 }
622
623 // end() is synchronous internally - signal accepted for interface compliance.
624 end(options) {

Callers 1

pumpFunction · 0.45

Calls 2

#isClosedOrAbortedMethod · 0.95
convertChunksFunction · 0.85

Tested by

no test coverage detected