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

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

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

Last synced: over 1 year ago
JSON representation

ES module for type checking DOM NodeLists.

Awesome Lists containing this project

README

          

# is-dom-node-list

Build status
Coverage
Version
0.3 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 `isDomNodeList`.

### Module

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

#### CommonJS

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

#### ES2015

```js
import isDomNodeList from 'is-dom-node-list'
```

## Usage

```js
const nodeList = document.querySelectorAll('.cookies')
isDomNodeList(nodeList)
// => true

const nodeArray = Array.prototype.slice.call(nodeList)
isDomNodeList(nodeArray)
// => false
```