is-dom-node

1.0.4 • Public • Published

is-dom-node

Build status Coverage Version 0.2KB min+gzip MIT License

Installation

Browser

A simple and fast way to get started is to include this script on your page:

<script src="https://unpkg.com/is-dom-node"></script>

This will create the global variable isDomNode.

Module

npm install is-dom-node

CommonJS

const isDomNode = require('is-dom-node')

ES2015

import isDomNode from 'is-dom-node'

Usage

const node = document.querySelector('#cake')
isDomNode(node)
// => true
 
const html = '<div id="cake"></div>'
isDomNode(html)
// => false

Dependencies (0)

    Dev Dependencies (19)

    Package Sidebar

    Install

    npm i is-dom-node

    Weekly Downloads

    7,080

    Version

    1.0.4

    License

    MIT

    Last publish

    Collaborators

    • jlmakes