mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
* Cleanup Part 2: Electric Boogaloo (Reloaded) * Moar cleanup * Tweak NOT_A_PERMISSION error
14 lines
287 B
JavaScript
14 lines
287 B
JavaScript
module.exports = function arraysEqual(a, b) {
|
|
if (a === b) return true;
|
|
if (a.length !== b.length) return false;
|
|
|
|
for (const itemInd in a) {
|
|
const item = a[itemInd];
|
|
const ind = b.indexOf(item);
|
|
if (ind) {
|
|
b.splice(ind, 1);
|
|
}
|
|
}
|
|
|
|
return b.length === 0;
|
|
};
|