Revision 1a57aefa6587cf01691408a6d74cfd2ccecc915f authored by Charlie Harrison on 09 April 2018, 22:16:22 UTC, committed by Philip Jägenstedt on 10 April 2018, 14:00:49 UTC
See blink-dev thread:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/kPli8ZCUeok

A browser test is moved to be a tentative WPT due to this change.

Bug: 772515
Change-Id: Icf99c8c303c5055dcbcdace6ae94e3fcd1a01921
Reviewed-on: https://chromium-review.googlesource.com/980599
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Jonathon Kereliuk <kereliuk@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549293}
1 parent d577e28
Raw File
arrays.js
// Returns true if the given arrays are equal. Optionally can pass an equality function.
export function areArraysEqual(a, b, equalityFunction = (c, d) => { return c === d; }) {
  try {
    if (a.length !== b.length)
      return false;

    for (let i = 0; i < a.length; i++) {
      if (!equalityFunction(a[i], b[i]))
        return false;
    }
  } catch (ex) {
    return false;
  }

  return true;
}
back to top