@azizbecha/strkit
Version:
strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.
13 lines • 455 B
JavaScript
/**
* Generates a random number between two values (inclusive).
* @param min - The minimum value.
* @param max - The maximum value.
* @returns A random number between min and max.
* @example
* randomBetween(1, 10); // Random number between 1 and 10
* randomBetween(0, 1); // Random number between 0 and 1
*/
export default function randomBetween(min, max) {
return Math.random() * (max - min) + min;
}
//# sourceMappingURL=randomBetween.js.map