MCPcopy Create free account
hub / github.com/instantdb/instant / parseChunkKey

Function parseChunkKey

client/packages/core/src/infiniteQuery.ts:73–76  ·  view source on GitHub ↗
(chunkKey: string)

Source from the content-addressed store, hash-verified

71const makeChunkKey = (cursor: Cursor, afterInclusive = false) =>
72 JSON.stringify([cursor, afterInclusive]);
73const parseChunkKey = (chunkKey: string) => {
74 const [cursor, afterInclusive] = JSON.parse(chunkKey) as [Cursor, boolean];
75 return { cursor, afterInclusive };
76};
77
78// Chunk sub key is used to create keys to keep track of the subscriptions
79// while chunk maps are keyed by [cursor, afterInclusive], we still distinguish

Callers 2

freezeReverseFunction · 0.85
loadNextPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected