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

Method transform

encoding/unstable_base64_stream.ts:173–189  ·  view source on GitHub ↗
(chunk, controller)

Source from the content-addressed store, hash-verified

171 let remainder = 0;
172 super({
173 transform(chunk, controller) {
174 let output = encode(chunk);
175 if (remainder) {
176 output = detach(output, remainder + output.length)[0];
177 output.set(push.subarray(0, remainder));
178 }
179 remainder = output.length % 4;
180 if (remainder) push.set(output.subarray(-remainder));
181 const o = decode(
182 output.subarray(0, -remainder || undefined),
183 0,
184 0,
185 abc,
186 padding,
187 );
188 controller.enqueue(output.subarray(0, o));
189 },
190 flush(controller) {
191 if (remainder) {
192 const o = decode(

Callers

nothing calls this directly

Calls 4

encodeFunction · 0.90
detachFunction · 0.90
decodeFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected