is-dom-detached

2.0.0 • Public • Published

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

Determine if a Node does not exist within a DOM tree.

Installation

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

npm install is-dom-detached

Importing

ES Module:

import isDetachedNode from 'is-dom-detached';

CommonJS Module:

const isDetachedNode = require('is-dom-detached');

Usage

const div = document.createElement('div');
isDetachedNode(div); //-> true
 
document.body.appendChild(div);
isDetachedNode(div); //-> false

/is-dom-detached/

    Package Sidebar

    Install

    npm i is-dom-detached

    Weekly Downloads

    3

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    6.75 kB

    Total Files

    6

    Last publish

    Collaborators

    • stevenvachon