Function
logCursor
(list: ListDef, cursor: unknown)
Source from the content-addressed store, hash-verified
| 4323 | |
| 4324 | /** A cursor as the log shows it: encoded, or `undefined` when it doesn't encode. */ |
| 4325 | const logCursor = (list: ListDef, cursor: unknown): Schema.Json | undefined => { |
| 4326 | try { |
| 4327 | return list.encodeCursor(cursor) as Schema.Json |
| 4328 | } catch { |
| 4329 | return undefined |
| 4330 | } |
| 4331 | } |
| 4332 | |
| 4333 | /** A cursor's identity within one walk: its encoding as JSON. */ |
| 4334 | const cursorKey = (list: ListDef, cursor: unknown): string | undefined => { |
Tested by
no test coverage detected