static getRandomInt(max, min) {
if (min) {
- return Math.floor((Math.random() * (max - min)) + min);
+ return Math.floor((Math.random() * (max - min + 1)) + min);
}
- return Math.floor((Math.random() * max));
+ return Math.floor((Math.random() * max + 1));
}
static basicFormatLog(prefixString = '') {
}
return false;
}
+
+ static isEmptyArray(object) {
+ if (Array.isArray(object) && object.length > 0) {
+ return false;
+ }
+ return true;
+ }
}
module.exports = Utils;