(state: CursorState)
| 79 | } |
| 80 | |
| 81 | function encodeCursor(state: CursorState): string { |
| 82 | return Buffer.from(JSON.stringify(state), 'utf8').toString('base64url') |
| 83 | } |
| 84 | |
| 85 | function decodeCursor(cursor?: string): CursorState { |
| 86 | if (!cursor) return { boardIndex: 0 } |