(bytes: Uint8Array)
| 68 | export type ConversationCursor = z.infer<typeof conversationCursorSchema>; |
| 69 | |
| 70 | function base64urlEncode(bytes: Uint8Array): string { |
| 71 | let binary = ''; |
| 72 | for (const byte of bytes) binary += String.fromCharCode(byte); |
| 73 | return btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); |
| 74 | } |
| 75 | |
| 76 | function base64urlDecode(str: string): Uint8Array { |
| 77 | const padded = str.replace(/-/g, '+').replace(/_/g, '/'); |
no test coverage detected