MCPcopy Create free account
hub / github.com/MultithreadedJSBook/code-samples / random64

Function random64

ch3-happycoin/happycoin-threads.js:9–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8const big64arr = new BigUint64Array(1);
9function random64() {
10 crypto.randomFillSync(big64arr);
11 return big64arr[0];
12}
13
14function sumDigitsSquared(num) {
15 let total = 0n;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected