[refactor] Moved 'compareArrays' to its own TS file

This commit is contained in:
Steven Evans
2018-07-05 16:50:51 -04:00
parent 1f7ed8f791
commit 6701503c78
4 changed files with 21 additions and 16 deletions
-14
View File
@@ -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,