/is-dom-void

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

Primary LanguageJavaScriptMIT LicenseMIT

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

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

Installation

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

npm install is-dom-void

Importing

ES Module:

import isDOMVoidElement from 'is-dom-void';

CommonJS Module:

const isDOMVoidElement = require('is-dom-void');

Usage

isDOMVoidElement(document.createElement('div')); //-> false
isDOMVoidElement(document.createElement('input')); //-> true