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

Method flush

encoding/unstable_base64_stream.ts:109–122  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

107 controller.enqueue(decode(output.subarray(0, o)));
108 },
109 flush(controller) {
110 if (remainder) {
111 const [output, i] = detach(
112 push.subarray(0, remainder),
113 calcSizeBase64(remainder),
114 );
115 let o = encode(output, i, 0, abc, padding);
116 if (options.alphabet === "base64url") {
117 const i = output.indexOf(padding, o - 2);
118 if (i > 0) o = i;
119 }
120 controller.enqueue(decode(output.subarray(0, o)));
121 }
122 },
123 });
124 }
125}

Callers

nothing calls this directly

Calls 4

detachFunction · 0.90
calcSizeBase64Function · 0.90
encodeFunction · 0.90
decodeFunction · 0.90

Tested by

no test coverage detected