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.
- Host: GitHub
- URL: https://github.com/jlmakes/is-dom-node-list
- Owner: jlmakes
- License: mit
- Created: 2018-01-06T15:10:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-30T19:51:15.000Z (over 8 years ago)
- Last Synced: 2025-03-27T02:51:18.130Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# is-dom-node-list
## 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
```