{"id":15362014,"url":"https://github.com/nervgh/recursive-iterator","last_synced_at":"2025-05-07T15:22:28.911Z","repository":{"id":57156953,"uuid":"31500376","full_name":"nervgh/recursive-iterator","owner":"nervgh","description":"It iterates through a graph recursively","archived":false,"fork":false,"pushed_at":"2017-08-10T19:31:29.000Z","size":117,"stargazers_count":90,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T03:22:56.160Z","etag":null,"topics":["recursion","recursive-iterator","traversal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nervgh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-01T15:21:59.000Z","updated_at":"2023-09-11T15:22:36.000Z","dependencies_parsed_at":"2022-08-30T20:00:52.396Z","dependency_job_id":null,"html_url":"https://github.com/nervgh/recursive-iterator","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervgh%2Frecursive-iterator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervgh%2Frecursive-iterator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervgh%2Frecursive-iterator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervgh%2Frecursive-iterator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervgh","download_url":"https://codeload.github.com/nervgh/recursive-iterator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902948,"owners_count":21822341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["recursion","recursive-iterator","traversal"],"created_at":"2024-10-01T12:57:54.241Z","updated_at":"2025-05-07T15:22:28.888Z","avatar_url":"https://github.com/nervgh.png","language":"JavaScript","readme":"# Recursive Iterator\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n\n## About\nIt iterates through a graph or a tree recursively.\n\n## Versions\n+ for support ES5 see `2.x.x` versions\n\n## Getting started\n\n### Quick overview (es6)\n```js\nlet iterator = new RecursiveIterator(\n  root /* {Object|Array} */,\n  [bypassMode = 0] /* {Number} */,\n  [ignoreCircular = false] /* {Boolean} */,\n  [maxDeep = 100] /* {Number} */\n)\n\nlet {value, done} = iterator.next()\nlet {parent, node, key, path, deep} = value\n\n// parent is parent node\n// node is current node\n// key is key of node\n// path is path to node\n// deep is current deep\n```\n\n### Example (es6)\n```js\nlet root = {\n  object: {\n    number: 1\n  },\n  string: 'foo'\n}\n\nfor (let {node, path} of new RecursiveIterator(root)) {\n  console.log(path.join('.'), node)\n}\n\n// object    Object {number: 1}\n// object.number    1\n// string    foo\n```\n\n## Roadmap\n* [Syntax](https://github.com/nervgh/recursive-iterator/wiki/Syntax)\n    * [ES6](https://github.com/nervgh/recursive-iterator/wiki/Syntax#es6)\n    * [ES5](https://github.com/nervgh/recursive-iterator/wiki/Syntax#es5)\n* API\n    * [Options](https://github.com/nervgh/recursive-iterator/wiki/Options)\n    * [Methods \u0026 Callbacks](https://github.com/nervgh/recursive-iterator/wiki/Methods-\u0026-Callbacks)\n* [Cookbook (es6)](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6))\n    * [Iterator (not recursive)](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6)#iterator-not-recursive)\n    * [DomIterator](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6)#domiterator)\n    * [Deep copy / Deep clone](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6)#deep-copy--deep-clone)\n    * [To Query String](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6)#to-query-string)\n    * [To Form Data](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6)#to-form-data)\n    * [Uninformed search algorithms](https://github.com/nervgh/recursive-iterator/wiki/Cookbook-(es6)#uninformed-search-algorithms)\n\n\n## Package managers\n### Bower\n```\nbower install recursive-iterator\n```\nYou could find this module in bower like [_recursive iterator_](http://bower.io/search/?q=recursive%20iterator).\n\n### NPM\n```\nnpm install recursive-iterator\n```\nYou could find this module in npm like [_recursive iterator_](https://www.npmjs.com/search?q=recursive+iterator).\n\n\n[npm-image]: https://img.shields.io/npm/v/recursive-iterator.svg?style=flat\n[npm-url]: https://npmjs.org/package/recursive-iterator\n[travis-image]: https://img.shields.io/travis/nervgh/recursive-iterator.svg?style=flat\n[travis-url]: https://travis-ci.org/nervgh/recursive-iterator\n[coveralls-image]: https://img.shields.io/coveralls/nervgh/recursive-iterator.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/nervgh/recursive-iterator?branch=master\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervgh%2Frecursive-iterator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervgh%2Frecursive-iterator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervgh%2Frecursive-iterator/lists"}