Aller au contenu principal

isDOMException

Callable

  • isDOMException(anyValue: unknown): anyValue is DOMException

  • Check if the provided value is a DOMException object.

    @example
    isDOMException(new DOMException('Test Error')); // true

    isDOMException(new TypeError('Test Error')); // false
    isDOMException(undefined); // false
    isDOMException({ name: 'Error' }); // false