github.com/nektos/act@v0.2.63/pkg/runner/testdata/actions/node16/node_modules/uuid/dist/esm-node/rng.js (about) 1 import crypto from 'crypto'; 2 const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 3 4 let poolPtr = rnds8Pool.length; 5 export default function rng() { 6 if (poolPtr > rnds8Pool.length - 16) { 7 crypto.randomFillSync(rnds8Pool); 8 poolPtr = 0; 9 } 10 11 return rnds8Pool.slice(poolPtr, poolPtr += 16); 12 }