Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

21
node_modules/es-toolkit/dist/math/randomInt.mjs generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { random } from "./random.mjs";
//#region src/math/randomInt.ts
/**
* Generates a random integer between minimum (inclusive) and maximum (exclusive).
*
* If only one argument is provided, a number between `0` and the given number is returned.
*
* @param {number} minimum - The lower bound (inclusive).
* @param {number} maximum - The upper bound (exclusive).
* @returns {number} A random integer between minimum (inclusive) and maximum (exclusive).
* @throws {Error} Throws an error if `maximum` is not greater than `minimum`.
*
* @example
* const result = randomInt(0, 5); // result will be a random integer between 0 (inclusive) and 5 (exclusive)
* const result2 = randomInt(5, 0); // This will throw an error
*/
function randomInt(minimum, maximum) {
return Math.floor(random(minimum, maximum));
}
//#endregion
export { randomInt };