is-dom-document
v1.0.0
Published
Determine if an object is a DOM Document (from any Realm).
Downloads
3
Readme
is-dom-document
Determine if an object is a
Document
(from anyRealm
).
Installation
Node.js >= 10
is required. To install, type this at the command line:
npm install is-dom-document
Importing
ES Module:
import isDOMDocument from 'is-dom-document';
CommonJS Module:
const isDOMDocument = require('is-dom-document');
Usage
isDOMDocument(window.document); //-> true
isDOMDocument({}); //-> false