mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 15:57:43 +02:00
Fix/Testing
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user