mirror of
https://github.com/mue/mue.git
synced 2026-07-21 16:04:22 +02:00
Fix and update everything
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class Util {
|
||||
// get random item
|
||||
static getRandIndex(array) {
|
||||
return Math.floor(Math.random() * (array.length - 1));
|
||||
}
|
||||
};
|
||||
|
||||
// pick random from array
|
||||
static pickFromArray(array) {
|
||||
@@ -40,9 +40,8 @@ module.exports = class Util {
|
||||
static contains(needle) {
|
||||
let findNaN = needle !== needle;
|
||||
let indexOf;
|
||||
if (!findNaN && typeof Array.prototype.indexOf === 'function') {
|
||||
indexOf = Array.prototype.indexOf;
|
||||
} else {
|
||||
if (!findNaN && typeof Array.prototype.indexOf === 'function') indexOf = Array.prototype.indexOf;
|
||||
else {
|
||||
indexOf = (needle) => {
|
||||
let i = -1,
|
||||
index = -1;
|
||||
|
||||
Reference in New Issue
Block a user