node-iterator

1.1.0 • Public • Published

node-iterator

A ES6 Generator that traverses the child nodes within the given Node

Sauce Test Status

Build Status

Installation

$ npm install node-iterator

Example

import NodeIterator from 'node-iterator';
 
// manual iteration
let node;
for (node of NodeIterator(document.body)) {
  console.log(node.nodeName);
}
 
// cast to an Array
let nodes = [...NodeIterator(document.body)];
console.log(nodes.length);

License

MIT

install

npm i node-iterator

Downloadsweekly downloads

64

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability