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.

26 lines 957 B
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports"], factory); } })(function (require, exports) { "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