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

Function write

io/to_writable_stream.ts:41–50  ·  view source on GitHub ↗
(chunk, controller)

Source from the content-addressed store, hash-verified

39
40 return new WritableStream({
41 async write(chunk, controller) {
42 try {
43 await writeAll(writer, chunk);
44 } catch (e) {
45 controller.error(e);
46 if (isCloser(writer) && autoClose) {
47 writer.close();
48 }
49 }
50 },
51 close() {
52 if (isCloser(writer) && autoClose) {
53 writer.close();

Callers 3

constructorMethod · 0.50
writeMethod · 0.50
releaseLineMethod · 0.50

Calls 3

writeAllFunction · 0.90
isCloserFunction · 0.90
closeMethod · 0.65

Tested by

no test coverage detected