Fix/Testing

This commit is contained in:
Dragon Fire
2020-11-22 11:16:29 -05:00
parent 608195ab5d
commit 63192b4960
2 changed files with 13 additions and 3 deletions
+6
View File
@@ -48,6 +48,12 @@ module.exports = class Util {
return arr;
}
static removeFromArray(arr, value) {
const index = arr.indexOf(value);
if (index > -1) return arr.splice(index, 1);
return arr;
}
static removeDuplicates(arr) {
if (arr.length === 0 || arr.length === 1) return arr;
const newArr = [];