MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / base64UrlDecode

Function base64UrlDecode

sdk/src/impl/chatgpt-backend-fetch.ts:21–27  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

19// ============================================================================
20
21function base64UrlDecode(str: string): string {
22 let base64 = str.replace(/-/g, '+').replace(/_/g, '/')
23 const pad = base64.length % 4
24 if (pad === 2) base64 += '=='
25 else if (pad === 3) base64 += '='
26 return Buffer.from(base64, 'base64').toString('utf-8')
27}
28
29export function extractChatGptAccountId(accessToken: string): string | null {
30 try {

Callers 1

extractChatGptAccountIdFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected