MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getState

Function getState

test/unit/core/other/checkpoints.test.ts:13–19  ·  view source on GitHub ↗
(first?: boolean)

Source from the content-addressed store, hash-verified

11
12const setContent = () => {
13 const getState = (first?: boolean): [Id, Tables, Values] => [
14 first
15 ? (checkpoints.getCheckpointIds()[1] as Id)
16 : checkpoints.addCheckpoint(),
17 store.getTables(),
18 store.getValues(),
19 ];
20 const listener = createCheckpointsListener(checkpoints);
21 const listenerId = listener.listenToCheckpoints('setContent');
22 const c0 = getState(true);

Callers 1

setContentFunction · 0.85

Calls 4

getCheckpointIdsMethod · 0.65
addCheckpointMethod · 0.65
getTablesMethod · 0.65
getValuesMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…