MCPcopy Index your code
hub / github.com/MALSync/MALSync / generateUniqueID

Function generateUniqueID

src/utils/scriptProxyWrapper.ts:4–8  ·  view source on GitHub ↗
(arraySize = 10)

Source from the content-addressed store, hash-verified

2 * Generates a (hex) string ID for randomisation/verification.
3 */
4export 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
10export function ScriptProxyWrapper(fnc: () => void) {
11 const tag = document.currentScript as HTMLScriptElement;

Callers 4

constructorMethod · 0.90
getDataMethod · 0.90
injectScriptMethod · 0.90
ScriptProxyWrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected