function deepEqual(val1, val2) {
  if (val1 === val2)
    return true;

  if (Array.isArray(val1) || Array.isArray(val2)) {
    if (!Array.isArray(val1) || !Array.isArray(val2))
      return false;
    return arraysEqual(
        /** @type {!Array} */ (val1),
        /** @type {!Array} */ (val2));
  }

  if (val1 instanceof Object && val2 instanceof Object)
    return objectsEqual(val1, val2);

  return false;
}
/**
 * Checks whether two values are recursively equal. Only compares serializable
 * data (primitives, serializable arrays and serializable objects).
 * @param {*} val1 Value to compare.
 * @param {*} val2 Value to compare with val1.
 * @return {boolean} True if the values are recursively equal.
 */
Checks whether two values are recursively equal. Only compares serializable
data (primitives, serializable arrays and serializable objects).
@param {*} val1 Value to compare.
@param {*} val2 Value to compare with val1.
@return {boolean} True if the values are recursively equal.
Checks whether two values are recursively equal . Only compares serializable data ( primitives serializable arrays and serializable objects ) . @param { * } val1 Value to compare . @param { * } val2 Value to compare with val1 . @return { boolean } True if the values are recursively equal .
function deepEqual(val1, val2) {
  if (val1 === val2)
    return true;
  if (Array.isArray(val1) || Array.isArray(val2)) {
    if (!Array.isArray(val1) || !Array.isArray(val2))
      return false;
    return arraysEqual(
         (val1),
         (val2));
  }
  if (val1 instanceof Object && val2 instanceof Object)
    return objectsEqual(val1, val2);
  return false;
}
function deepEqual ( val1 , val2 ) { if ( val1 === val2 ) return true ; if ( Array . isArray ( val1 ) || Array . isArray ( val2 ) ) { if ( ! Array . isArray ( val1 ) || ! Array . isArray ( val2 ) ) return false ; return arraysEqual ( ( val1 ) , ( val2 ) ) ; } if ( val1 instanceof Object && val2 instanceof Object ) return objectsEqual ( val1 , val2 ) ; return false ; }
Checks whether two values are recursively equal.
Checks whether two values are recursively equal .
/** @type {!Array} */ /** @type {!Array} */