- Notifications
You must be signed in to change notification settings - Fork9
It iterates through a graph recursively
License
NotificationsYou must be signed in to change notification settings
nervgh/recursive-iterator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
It iterates through a graph or a tree recursively.
- for support ES5 see
2.x.xversions
letiterator=newRecursiveIterator(root/* {Object|Array} */,[bypassMode=0]/* {Number} */,[ignoreCircular=false]/* {Boolean} */,[maxDeep=100]/* {Number} */)let{value, done}=iterator.next()let{parent, node, key, path, deep}=value// parent is parent node// node is current node// key is key of node// path is path to node// deep is current deep
letroot={object:{number:1},string:'foo'}for(let{node, path}ofnewRecursiveIterator(root)){console.log(path.join('.'),node)}// object Object {number: 1}// object.number 1// string foo
bower install recursive-iteratorYou could find this module in bower likerecursive iterator.
npm install recursive-iteratorYou could find this module in npm likerecursive iterator.
About
It iterates through a graph recursively
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.