MCPcopy Index your code
hub / github.com/anomalyco/opencode / base64Decode

Function base64Decode

packages/core/src/util/encode.ts:7–11  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

5}
6
7export function base64Decode(value: string) {
8 const binary = atob(value.replace(/-/g, "+").replace(/_/g, "/"))
9 const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0))
10 return new TextDecoder().decode(bytes)
11}
12
13export async function hash(content: string, algorithm = "SHA-256"): Promise<string> {
14 const encoder = new TextEncoder()

Callers 1

decode64Function · 0.90

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected