MCPcopy Create free account
hub / github.com/tailscale/tailcat / transform

Function transform

web/app.js:74–84  ·  view source on GitHub ↗
(chunk, controller)

Source from the content-addressed store, hash-verified

72 let loaded = 0;
73 return stream.pipeThrough(new TransformStream({
74 transform(chunk, controller) {
75 loaded += chunk.byteLength;
76 if (total > 0) {
77 bar.value = loaded / total;
78 const pct = Math.min(100, Math.floor(100 * loaded / total));
79 setStatus(`Loading WebAssembly… ${pct}%${ofMB}`);
80 } else {
81 setStatus(`Loading WebAssembly…`);
82 }
83 controller.enqueue(chunk);
84 },
85 }));
86}
87

Callers

nothing calls this directly

Calls 1

setStatusFunction · 0.85

Tested by

no test coverage detected