UNPKG

@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.

16 lines 550 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = randomBetween; /** * 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 */ function randomBetween(min, max) { return Math.random() * (max - min) + min; } //# sourceMappingURL=randomBetween.js.map