Recursive Iterator
About
It iterates through a graph or a tree recursively.
Versions
- for support ES5 see
2.x.x
versions
Getting started
Quick overview (es6)
let iterator = new RecursiveIterator(
root ,
[bypassMode=0] ,
[ignoreCircular=false] ,
[maxDeep=100]
);
let {value, done} = iterator.next();
let {parent, node, key, path, deep} = value;
Example (es6)
let root = {
object: {
number: 1
},
string: 'foo'
};
for(let {node, path} of new RecursiveIterator(root)) {
console.log(path.join('.'), node);
}
Roadmap
Package managers
Bower
bower install recursive-iterator
You could find this module in bower like recursive iterator.
NPM
npm install recursive-iterator
You could find this module in npm like recursive iterator.