MCPcopy Index your code
hub / github.com/simstudioai/sim / decodeTimeCursor

Function decodeTimeCursor

apps/sim/lib/data-drains/sources/cursor.ts:19–28  ·  view source on GitHub ↗
(cursor: Cursor)

Source from the content-addressed store, hash-verified

17}
18
19export function decodeTimeCursor(cursor: Cursor): TimeCursor | null {
20 if (!cursor) return null
21 try {
22 const parsed = JSON.parse(cursor) as TimeCursor
23 if (typeof parsed?.ts !== 'string' || typeof parsed?.id !== 'string') return null
24 return parsed
25 } catch {
26 return null
27 }
28}
29
30/**
31 * Builds a strict-greater-than predicate over a `(timestampCol, idCol)` pair.

Callers 6

pagesFunction · 0.90
pagesFunction · 0.90
pagesFunction · 0.90
pagesFunction · 0.90
cursor.test.tsFile · 0.90
pagesFunction · 0.90

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected