UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

10 lines (9 loc) 282 B
/** * @deprecated Use **getRandomInt** instead * @param {8 | 16 | 32 | 64 | 128 | 160 | 256} bits * @returns {string} */ export function getRandomUint(bits = 32) { // eslint-disable-next-line no-bitwise return Math.abs(~~(Math.random() * (2 ** bits)) | 0).toString(); }