Skip to main content

isElement

Checks if value is likely a DOM element.

API

function isElement(value: any): value is Element;

Usage

import { isUndefined } from '@feedzai/js-utilities';

isElement(document.body)
// true

isElement('<body>')
// false