JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6175
  • Score
    100M100P100Q129470F
  • License MIT

ES2015 module for type checking DOM Nodes

Package Exports

  • is-dom-node

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-dom-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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