|
|
@ -1,6 +1,6 @@ |
|
|
|
"use strict"; |
|
|
|
Object.defineProperty(exports, "__esModule", { value: true }); |
|
|
|
exports.TimeLogger = exports.polyfill = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0; |
|
|
|
exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0; |
|
|
|
const _dayjs = require("dayjs"); |
|
|
|
const dayjs = _dayjs; |
|
|
|
exports.isDev = process.env.NODE_ENV === "development"; |
|
|
@ -58,3 +58,13 @@ class TimeLogger { |
|
|
|
} |
|
|
|
} |
|
|
|
exports.TimeLogger = TimeLogger; |
|
|
|
function getRandomArbitrary(min, max) { |
|
|
|
return Math.random() * (max - min) + min; |
|
|
|
} |
|
|
|
exports.getRandomArbitrary = getRandomArbitrary; |
|
|
|
function getRandomInt(min, max) { |
|
|
|
min = Math.ceil(min); |
|
|
|
max = Math.floor(max); |
|
|
|
return Math.floor(Math.random() * (max - min + 1)) + min; |
|
|
|
} |
|
|
|
exports.getRandomInt = getRandomInt; |
|
|
|