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

Method transform

encoding/unstable_base32_stream.ts:171–187  ·  view source on GitHub ↗
(chunk, controller)

Source from the content-addressed store, hash-verified

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