Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@alexspirgel/is-element

alexspirgel121MIT1.0.4

A utility function that returns true if the argument is a DOM element. Otherwise returns false.

is-element, iselement, element, object

readme

Is Element

A utility function that returns true if the argument is a DOM element. Otherwise returns false.

Installation

Using NPM:

npm install @alexspirgel/is-element
const isElement = require('@alexspirgel/is-element');

Usage

isElement(document.body); // returns true
isElement({}); // returns false
isElement(null); // returns false