mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 11:21:16 +02:00
Fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user