( sheetDefinitions: SheetDefinition[], customKey?: string | null )
| 72 | } |
| 73 | |
| 74 | function 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 | |
| 83 | function hashString(str: string): number { |
| 84 | let hash = 0; |
no test coverage detected