web/utils.js
Matej Focko fc1c9162d6
chore: factor out Array.equals
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-05-07 16:53:04 +02:00

14 lines
259 B
JavaScript

Array.prototype.equals = function (other) {
if (this.length != other.length) {
return false;
}
let i = this.length;
while (--i >= 0) {
if (this[i] !== other[i]) {
return false;
}
}
return true;
};