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

Function createStore

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:1027–2496  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1025);
1026var contentOrChangesIsEqual = ([tables1, values1], [tables2, values2]) => objIsEqual(tables1, tables2) && objIsEqual(values1, values2);
1027var createStore = () => {
1028 let hasTablesSchema;
1029 let hasValuesSchema;
1030 let hadTables = false;
1031 let hadValues = false;
1032 let transactions = 0;
1033 let middleware = [];
1034 let internalListeners = [];
1035 let mutating = 0;
1036 const changedTableIds = mapNew();
1037 const changedTableCellIds = mapNew();
1038 const changedRowCount = mapNew();
1039 const changedRowIds = mapNew();
1040 const changedCellIds = mapNew();
1041 const changedCells = mapNew();
1042 const defaultedCells = mapNew();
1043 const changedValueIds = mapNew();
1044 const changedValues = mapNew();
1045 const defaultedValues = setNew();
1046 const invalidCells = mapNew();
1047 const invalidValues = mapNew();
1048 const tablesSchemaMap = mapNew();
1049 const tablesSchemaRowCache = mapNew();
1050 const valuesSchemaMap = mapNew();
1051 const valuesDefaulted = mapNew();
1052 const valuesNonDefaulted = setNew();
1053 const tablePoolFunctions = mapNew();
1054 const tableCellIds = mapNew();
1055 const tablesMap = mapNew();
1056 const valuesMap = mapNew();
1057 const hasTablesListeners = pairNewMap();
1058 const tablesListeners = pairNewMap();
1059 const tableIdsListeners = pairNewMap();
1060 const hasTableListeners = pairNewMap();
1061 const tableListeners = pairNewMap();
1062 const tableCellIdsListeners = pairNewMap();
1063 const hasTableCellListeners = pairNewMap();
1064 const rowCountListeners = pairNewMap();
1065 const rowIdsListeners = pairNewMap();
1066 const sortedRowIdsListeners = pairNewMap();
1067 const hasRowListeners = pairNewMap();
1068 const rowListeners = pairNewMap();
1069 const cellIdsListeners = pairNewMap();
1070 const hasCellListeners = pairNewMap();
1071 const cellListeners = pairNewMap();
1072 const invalidCellListeners = pairNewMap();
1073 const invalidValueListeners = pairNewMap();
1074 const hasValuesListeners = pairNewMap();
1075 const valuesListeners = pairNewMap();
1076 const valueIdsListeners = pairNewMap();
1077 const hasValueListeners = pairNewMap();
1078 const valueListeners = pairNewMap();
1079 const startTransactionListeners = mapNew();
1080 const finishTransactionListeners = pairNewMap();
1081 const [addListener, callListeners, delListenerImpl, callListenerImpl] = getListenerFunctions(() => store);
1082 const whileMutating = (action) => {
1083 const wasMutating = mutating;
1084 mutating = 1;

Calls 15

mapNewFunction · 0.70
setNewFunction · 0.70
pairNewMapFunction · 0.70
getListenerFunctionsFunction · 0.70
objMapFunction · 0.70
hasTablesFunction · 0.70
hasTableFunction · 0.70
hasTableCellFunction · 0.70
hasRowFunction · 0.70
hasCellFunction · 0.70
pairNewFunction · 0.70
getCellFunction · 0.70

Tested by 3

ProvideStore2Function · 0.72
getTimeAxisLabelsFunction · 0.72
createClientFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…