This commit is contained in:
Dragon Fire
2024-05-06 14:32:29 -04:00
parent 478ec45e9c
commit 771bf76b95
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -61,6 +61,12 @@ module.exports = class Util {
}
static removeFromArray(arr, value) {
const index = arr.indexOf(value);
if (index > -1) return arr.splice(index, 1);
return arr;
}
static removeAllFromArray(arr, value) {
return arr.filter(i => i !== value);
}