mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 11:10:58 +02:00
[refactor] Moved 'compareArrays' to its own TS file
This commit is contained in:
@@ -90,23 +90,9 @@ function clearSelector(selector) {
|
||||
}
|
||||
}
|
||||
|
||||
//Returns true if all elements are equal, and false otherwise
|
||||
//Assumes both arguments are arrays and that there are no nested arrays
|
||||
function compareArrays(a1, a2) {
|
||||
if (a1.length != a2.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < a1.length; ++i) {
|
||||
if (a1[i] != a2[i]) {return false;}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export {sizeOfObject,
|
||||
clearObject,
|
||||
clearEventListeners,
|
||||
compareArrays,
|
||||
clearEventListenersEl,
|
||||
removeElement,
|
||||
createAccordionElement,
|
||||
|
||||
Reference in New Issue
Block a user