MCPcopy Create free account
hub / github.com/HelloCSV/HelloCSV / stateKey

Function stateKey

src/importer/storage.ts:74–81  ·  view source on GitHub ↗
(
  sheetDefinitions: SheetDefinition[],
  customKey?: string | null
)

Source from the content-addressed store, hash-verified

72}
73
74function stateKey(
75 sheetDefinitions: SheetDefinition[],
76 customKey?: string | null
77): string {
78 const prefix = customKey ? `importer-state-${customKey}` : 'importer-state';
79 const key = JSON.stringify(sheetDefinitions);
80 return `${prefix}-${hashString(key)}`;
81}
82
83function hashString(str: string): number {
84 let hash = 0;

Callers 2

getIndexedDBStateFunction · 0.85
setIndexedDBStateFunction · 0.85

Calls 1

hashStringFunction · 0.85

Tested by

no test coverage detected