MCPcopy Index your code
hub / github.com/retejs/rete / getUID

Function getUID

src/utils.ts:6–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 * @returns A unique id
5 */
6export function getUID(): string {
7 if ('randomBytes' in crypto) {
8 return crypto.randomBytes(8).toString('hex')
9 }
10
11 const bytes = crypto.getRandomValues(new Uint8Array(8))
12 const array = Array.from(bytes)
13 const hexPairs = array.map(b => b.toString(16).padStart(2, '0'))
14
15 return hexPairs.join('')
16}

Callers 6

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…