MCPcopy Create free account
hub / github.com/denoland/std / writeAll

Function writeAll

io/write_all.ts:31–36  ·  view source on GitHub ↗
(writer: Writer, data: Uint8Array)

Source from the content-addressed store, hash-verified

29 * @param data The data to write
30 */
31export async function writeAll(writer: Writer, data: Uint8Array) {
32 let nwritten = 0;
33 while (nwritten < data.length) {
34 nwritten += await writer.write(data.subarray(nwritten));
35 }
36}
37
38/**
39 * Synchronously write all the content of the array buffer (`arr`) to the

Callers 4

copyFunction · 0.90
readFunction · 0.90
write_all_test.tsFile · 0.90
writeFunction · 0.90

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected