jty
    Preparing search index...

    Function isEqualErr

    • Checks if two Error objects are the same.

      Parameters

      • x: unknown

        The first value to compare.

      • ref: Error

        The reference Error.

      Returns x is Error

      true if the errors are the same, false otherwise.

      if ref is not an Error.

      isEqualErr(new Error('test'), new Error('test')) => true
      isEqualErr(new Error('test'), new TypeError('test')) => false
      isEqualErr(new Error('test'), new Error('other')) => false