JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "random-number.ts"

Full Path: /home/markqprx/iniasli.pro/client/utils/string/random-number.ts
File size: 319 bytes
MIME-type: text/plain
Charset: utf-8

export function randomNumber(min: number = 1, max: number = 10000) {
  const randomBuffer = new Uint32Array(1);

  window.crypto.getRandomValues(randomBuffer);

  const number = randomBuffer[0] / (0xffffffff + 1);

  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(number * (max - min + 1)) + min;
}