md5-fight-plus
Version:
13 lines (12 loc) • 389 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRandomScope = getRandomScope;
function getRandomScope(start, end) {
// 确保 start 小于 end
if (start >= end) {
throw new Error("start 必须小于 end");
}
// 生成随机整数
const random = Math.floor(Math.random() * (end - start + 1)) + start;
return random;
}