MCPcopy Create free account
hub / github.com/cloudflare/agents / base64ToBytes

Function base64ToBytes

packages/shell/src/filesystem.ts:1556–1563  ·  view source on GitHub ↗
(b64: string)

Source from the content-addressed store, hash-verified

1554}
1555
1556function base64ToBytes(b64: string): Uint8Array {
1557 const binary = atob(b64);
1558 const bytes = new Uint8Array(binary.length);
1559 for (let i = 0; i < binary.length; i++) {
1560 bytes[i] = binary.charCodeAt(i);
1561 }
1562 return bytes;
1563}
1564
1565// ── Path helpers ─────────────────────────────────────────────────────
1566

Callers 3

readFileMethod · 0.85
readFileBytesMethod · 0.85
readFileStreamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected