Const getRandomValues
getRandomValues: getRandomValues = (() => {// Look up the crypto module if available.const crypto: any = ((typeof window !== 'undefined' && (window.crypto || window.msCrypto)) ||(typeof require !== 'undefined' && require('crypto')) || null);// Modern browsers and IE 11if (crypto && typeof crypto.getRandomValues === 'function') {return function getRandomValues(buffer: Uint8Array): void {return crypto.getRandomValues(buffer);}}// Node 7+if (crypto && typeof crypto.randomFillSync === 'function') {return function getRandomValues(buffer: Uint8Array): void {return crypto.randomFillSync(buffer);}}// Node 0.10+if (crypto && typeof crypto.randomBytes === 'function') {return function getRandomValues(buffer: Uint8Array): void {let bytes = crypto.randomBytes(buffer.length);for (let i = 0, n = bytes.length; i < n; ++i) {buffer[i] = bytes[i];}}}// Fallbackreturn function getRandomValues(buffer: Uint8Array): void {let value = 0;for (let i = 0, n = buffer.length; i < n; ++i) {if (i % 4 === 0) {value = Math.random() * 0xFFFFFFFF >>> 0;}buffer[i] = value & 0xFF;value >>>= 8;}}})()
The namespace for random number related functionality.