UNPKG

outers

Version:

outers - a all in one package for your day to day use

20 lines 983 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); // Import Random Number Function const NumFunction_1 = __importDefault(require("../Function/NumFunction")); // function for generating a random word // Main Function to Generate Random Boolean /** * Generates a random boolean value from the given array of booleans. * @param ArrayOFboolean - The array of booleans to generate from. * @returns The randomly generated boolean value. */ function GenerateBoolean(ArrayOFboolean) { const RandomIndex = (0, NumFunction_1.default)(1, true, [0, 1]); // Generate Random Index Between 0 and Array Length - 1 const RandomBoolean = ArrayOFboolean[RandomIndex]; // Get the Random Boolean return RandomBoolean; // Return the Random Boolean } exports.default = GenerateBoolean; //# sourceMappingURL=BooleanGen.js.map