MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / decode

Function decode

packages/@contentlayer/utils/src/base64.ts:109–117  ·  view source on GitHub ↗
(b64: string)

Source from the content-addressed store, hash-verified

107 * @param b64
108 */
109export const decode = (b64: string): Uint8Array => {
110 const binString = atob(b64)
111 const size = binString.length
112 const bytes = new Uint8Array(size)
113 for (let i = 0; i < size; i++) {
114 bytes[i] = binString.charCodeAt(i)
115 }
116 return bytes
117}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…