An open API service indexing awesome lists of open source software.

https://github.com/jlmakes/is-dom-node

ES module for type checking DOM Nodes.
https://github.com/jlmakes/is-dom-node

Last synced: 11 months ago
JSON representation

ES module for type checking DOM Nodes.

Awesome Lists containing this project

README

          

# is-dom-node

Build status
Coverage
Version
0.2 kB min+gzip
MIT License

## Installation

### Browser

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

```html

```

This will create the global variable `isDomNode`.

### Module

```bash
npm install is-dom-node
```

#### CommonJS

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

#### ES2015

```js
import isDomNode from 'is-dom-node'
```

## Usage

```js
const node = document.querySelector('#cake')
isDomNode(node)
// => true

const html = '

'
isDomNode(html)
// => false
```