stevenvachon / is-dom-void

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:MIT License


Languages

Language:JavaScript 100.0%