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

Function write

test/parallel/test-whatwg-writablestream.js:163–169  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

161 );
162
163 async function write(stream) {
164 const writer = stream.getWriter();
165 const p = writer.write('hello');
166 assert.strictEqual(writer.desiredSize, 0);
167 await p;
168 assert.strictEqual(writer.desiredSize, 1);
169 }
170
171 write(stream).then(common.mustCall(() => {
172 assert.deepStrictEqual(['hello'], sink.chunks);

Callers 1

Calls 2

getWriterMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…