(str: string)
| 12 | }; |
| 13 | |
| 14 | export const decode = (str: string) => { |
| 15 | const atob = |
| 16 | typeof window === 'undefined' |
| 17 | ? (str: string) => Buffer.from(str, 'base64').toString('binary') |
| 18 | : window.atob; |
| 19 | return JSON.parse(atob(str)); |
| 20 | }; |
| 21 | |
| 22 | export const hash = (str: string) => { |
| 23 | let hash = 5381, |