export function randomValuesOnly()

in packages/random-source-browser/src/index.ts [25:36]


export function randomValuesOnly(byteLength: number): Promise<Uint8Array> {
  // Find the global scope for this runtime
  const globalScope = locateWindow();

  if (supportsSecureRandom(globalScope)) {
    return webCryptoRandomValues(byteLength);
  } else if (isMsWindow(globalScope)) {
    return ie11RandomValues(byteLength);
  }

  return Promise.reject(new Error(`Unable to locate a secure random source.`));
}