(arraySize = 10)
| 2 | * Generates a (hex) string ID for randomisation/verification. |
| 3 | */ |
| 4 | export function generateUniqueID(arraySize = 10): string { |
| 5 | const array = new Uint32Array(arraySize); |
| 6 | window.crypto.getRandomValues(array); |
| 7 | return Array.from(array, value => value.toString(16)).join(''); |
| 8 | } |
| 9 | |
| 10 | export function ScriptProxyWrapper(fnc: () => void) { |
| 11 | const tag = document.currentScript as HTMLScriptElement; |
no outgoing calls
no test coverage detected