@yookue/ts-lang-utils
    Preparing search index...

    Function equals

    • Returns whether the given arrays are equal

      Parameters

      • Optionalarray: null | any[] | readonly any[]

        the source array to check

      • Optionalcomparison: null | any[] | readonly any[]

        the target array to compare

      Returns boolean

      whether the given arrays are equal

      David Hsing

      equals(undefined, undefined);    // true
      equals(undefined, null); // false
      equals([], []); // true
      equals(['foo', 'bar'], ['foo', 'bar']); // true
      equals(['foo', 'bar'], ['bar', 'foo']); // false