(b64: string)
| 22 | } |
| 23 | |
| 24 | function decompress(b64: string): unknown { |
| 25 | const base64 = b64.replace(/-/g, "+").replace(/_/g, "/"); |
| 26 | const binary = atob(base64); |
| 27 | const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0)); |
| 28 | const decompressed = inflateSync(bytes); |
| 29 | return JSON.parse(new TextDecoder().decode(decompressed)); |
| 30 | } |
| 31 | |
| 32 | const PASTE_API = "https://plannotator-paste.plannotator.workers.dev"; |
| 33 |
no test coverage detected