MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / base64Decode

Function base64Decode

packages/shared/src/utils.ts:12–15  ·  view source on GitHub ↗
(base64: string)

Source from the content-addressed store, hash-verified

10
11// From https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem
12export const base64Decode = (base64: string): string => {
13 const binString = atob(base64);
14 return Buffer.from(Uint8Array.from(binString, (m) => m.codePointAt(0)!).buffer).toString();
15}
16
17// TODO: Merge this with config loading logic which uses AJV
18export const loadJsonFile = async <T>(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected