1.0.0 • Published 5 years ago

is-dom-document v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

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

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