CSRF-X Auth Library - v1.0.3
    Preparing search index...

    Function isAuthError

    • Type guard to check if an unknown value is an AuthError instance.

      Parameters

      • error: unknown

        Value to check.

      Returns error is AuthError

      true if error instanceof AuthError.

      if (isAuthError(err)) {
      console.error(err.code);
      }

      @public

      0.1.1