mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 19:50:55 +00:00
Webpack build for branch master: d0c2b84659
This commit is contained in:
parent
03048d4377
commit
7c2b8cfcb9
2 changed files with 7 additions and 9 deletions
|
|
@ -1193,21 +1193,19 @@ class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does some weird shit to test the equality of two arrays' elements.
|
* Checks whether the arrays are equal, also removes duplicated entries from b.
|
||||||
* <warn>Do not use. This will give your dog/cat severe untreatable cancer of the everything. RIP Fluffykins.</warn>
|
* @param {Array<*>} a Array which will not be modified.
|
||||||
* @param {Array<*>} a ????
|
* @param {Array<*>} b Array to remove duplicated entries from.
|
||||||
* @param {Array<*>} b ?????????
|
* @returns {boolean} boolean Whether the arrays are equal.
|
||||||
* @returns {boolean}
|
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
static arraysEqual(a, b) {
|
static arraysEqual(a, b) {
|
||||||
if (a === b) return true;
|
if (a === b) return true;
|
||||||
if (a.length !== b.length) return false;
|
if (a.length !== b.length) return false;
|
||||||
|
|
||||||
for (const itemInd in a) {
|
for (const item of a) {
|
||||||
const item = a[itemInd];
|
|
||||||
const ind = b.indexOf(item);
|
const ind = b.indexOf(item);
|
||||||
if (ind) b.splice(ind, 1);
|
if (ind !== -1) b.splice(ind, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return b.length === 0;
|
return b.length === 0;
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue