Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-dom-node

jlmakes23.8kMIT1.0.4

ES2015 module for type checking DOM Nodes

html, element, dom, node

readme

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

changelog

Change Log

1.0.4 - 2018-01-11

Changed

  • Revised readme.

1.0.3 - 2018-01-11

Changed

  • Revised readme.

1.0.2 - 2018-01-10

Changed

  • Updated repository file structure.

1.0.1 - 2018-01-06

Fixed

  • Fixed incorrect release url in changelog.
  • Fixed readme formatting.

1.0.0 - 2018-01-06

Hello world!