UNPKG

step-sequence-generator

Version:

A step sequence generator for figure skating programs

12 lines (11 loc) 488 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.randomGenerator = randomGenerator; const node_crypto_1 = require("node:crypto"); const custom_errors_1 = require("../errors/custom-errors"); function randomGenerator(min, max) { if (max <= min) { throw new custom_errors_1.UtilsError(`from randomGenerator: Not enough maximum number. Should be > ${min}, got ${max}`, 'WRONG_VALUE'); } return (0, node_crypto_1.randomInt)(min, max); }