stevenvachon / is-dom-element2

Determine if an object is an HTMLElement (from any Realm).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is-dom-element NPM Version File Size Build Status Coverage Status Dependency Monitor

Determine if an object is an HTMLElement (from any Realm).

Installation

Node.js >= 10 is required. To install, type this at the command line:

npm install is-dom-element

Importing

ES Module:

import isDOMElement from 'is-dom-element';

CommonJS Module:

const isDOMElement = require('is-dom-element');

Usage

isDOMElement(document.createElement('div')); //-> true
isDOMElement(document.createTextNode('content')); //-> false

About

Determine if an object is an HTMLElement (from any Realm).

License:MIT License


Languages

Language:JavaScript 100.0%