{"_id":"flat-tree","_rev":"237273","name":"flat-tree","description":"A series of functions to map a binary tree to a list","dist-tags":{"latest":"1.9.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2023-03-24T16:34:14.000Z","created":"2015-06-15T23:37:33.261Z","1.9.0":"2021-10-28T12:59:34.369Z","1.8.0":"2020-12-03T09:45:08.698Z","1.7.0":"2020-11-16T13:37:46.950Z","1.6.0":"2017-02-28T14:00:35.567Z","1.5.0":"2017-02-22T04:11:59.522Z","1.4.0":"2016-03-07T19:17:01.886Z","1.3.0":"2015-11-30T08:21:25.602Z","1.2.1":"2015-10-07T12:44:30.507Z","1.2.0":"2015-09-20T18:51:00.678Z","1.1.1":"2015-09-05T11:16:46.208Z","1.1.0":"2015-07-21T08:36:27.906Z","1.0.1":"2015-06-15T23:43:07.469Z","1.0.0":"2015-06-15T23:37:33.261Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"versions":{"1.9.0":{"name":"flat-tree","version":"1.9.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"standard":"^14.3.4","tape":"^5.0.1"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"93ce9742c833fcddbbe5c13c99bb6edede813e67","_id":"flat-tree@1.9.0","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"shasum":"cdd9e9884b7fd1973a04709b694f75e47ee18b8c","size":4777,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.9.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.9.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flat-tree_1.9.0_1635425974255_0.49269058609951166"},"_hasShrinkwrap":false,"publish_time":1635425974369,"_cnpm_publish_time":1635425974369,"_cnpmcore_publish_time":"2021-12-17T00:25:16.733Z"},"1.8.0":{"name":"flat-tree","version":"1.8.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"standard":"^14.3.4","tape":"^5.0.1"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"e5e0667ee096485ea557c7dfa112f5c888ac2e31","_id":"flat-tree@1.8.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"0c3d4fcdbad92db81432ea253a12b6c612d17fb7","size":4575,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.8.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.8.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flat-tree_1.8.0_1606988708497_0.3354731505130675"},"_hasShrinkwrap":false,"publish_time":1606988708698,"_cnpm_publish_time":1606988708698,"_cnpmcore_publish_time":"2021-12-17T00:25:17.010Z"},"1.7.0":{"name":"flat-tree","version":"1.7.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"standard":"^14.3.4","tape":"^5.0.1"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"0b74c14edcdf771e2639d32763ae3630e0cb9fb3","_id":"flat-tree@1.7.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"cb0285428a9d8a64e1beaaf0d2f8fa1527b328ca","size":4298,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.7.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.7.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flat-tree_1.7.0_1605533866830_0.5186592500432505"},"_hasShrinkwrap":false,"publish_time":1605533866950,"_cnpm_publish_time":1605533866950,"_cnpmcore_publish_time":"2021-12-17T00:25:17.211Z"},"1.6.0":{"name":"flat-tree","version":"1.6.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"standard":"^8.6.0","tape":"^4.0.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"351d19b9f99ff00fbc7caff651c17ab705c41782","_id":"flat-tree@1.6.0","_shasum":"fca30cddb9006fb656eb5ebc79aeb274e7fde9ed","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"fca30cddb9006fb656eb5ebc79aeb274e7fde9ed","size":3887,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.6.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.6.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/flat-tree-1.6.0.tgz_1488290433959_0.9538641653489321"},"directories":{},"publish_time":1488290435567,"_hasShrinkwrap":false,"_cnpm_publish_time":1488290435567,"_cnpmcore_publish_time":"2021-12-17T00:25:17.440Z"},"1.5.0":{"name":"flat-tree","version":"1.5.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"763f9cdcc1738f4ad396b857057900d1eb89462b","_id":"flat-tree@1.5.0","_shasum":"6dc466174ee593eda4a59564f4bb20e8f3a618e9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"6dc466174ee593eda4a59564f4bb20e8f3a618e9","size":3230,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.5.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.5.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/flat-tree-1.5.0.tgz_1487736717547_0.7994100879877806"},"directories":{},"publish_time":1487736719522,"_hasShrinkwrap":false,"_cnpm_publish_time":1487736719522,"_cnpmcore_publish_time":"2021-12-17T00:25:17.655Z"},"1.4.0":{"name":"flat-tree","version":"1.4.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"ca54a6f05cccbaa240729a38107226cda4dfddf8","_id":"flat-tree@1.4.0","_shasum":"d976551e829b50f42a5213c913ccf9d81935181d","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"d976551e829b50f42a5213c913ccf9d81935181d","size":3215,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.4.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.4.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/flat-tree-1.4.0.tgz_1457378219839_0.5223089377395809"},"directories":{},"publish_time":1457378221886,"_hasShrinkwrap":false,"_cnpm_publish_time":1457378221886,"_cnpmcore_publish_time":"2021-12-17T00:25:17.878Z"},"1.3.0":{"name":"flat-tree","version":"1.3.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"0c787e6affbd185385cf4af3ea2db05fe9ee1ccd","_id":"flat-tree@1.3.0","_shasum":"90d755dc7fa9570cdfc2b7fa8c51d4efe85293ec","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"90d755dc7fa9570cdfc2b7fa8c51d4efe85293ec","size":3207,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.3.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.3.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1448871685602,"_hasShrinkwrap":false,"_cnpm_publish_time":1448871685602,"_cnpmcore_publish_time":"2021-12-17T00:25:18.078Z"},"1.2.1":{"name":"flat-tree","version":"1.2.1","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"6d001ee45d87ea864d8b2fa7e0310e6fbc822d70","_id":"flat-tree@1.2.1","_shasum":"2893700246b8a2f5d3ccdf356f4e8978b403f068","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"2893700246b8a2f5d3ccdf356f4e8978b403f068","size":3133,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.2.1.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.2.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1444221870507,"_hasShrinkwrap":false,"_cnpm_publish_time":1444221870507,"_cnpmcore_publish_time":"2021-12-17T00:25:18.316Z"},"1.2.0":{"name":"flat-tree","version":"1.2.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"0a308065943547d0c3d85dfd8661ffe0329b32c5","_id":"flat-tree@1.2.0","_shasum":"fda72047d114e38d894b8f876244fbc3c0994242","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"fda72047d114e38d894b8f876244fbc3c0994242","size":2966,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.2.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.2.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1442775060678,"_hasShrinkwrap":false,"_cnpm_publish_time":1442775060678,"_cnpmcore_publish_time":"2021-12-17T00:25:18.502Z"},"1.1.1":{"name":"flat-tree","version":"1.1.1","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"178886478029c4c3eba77b92abd235bdde55281f","_id":"flat-tree@1.1.1","_shasum":"0d66520669cefc5e4d3b3b8f28828dc5643cabc2","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"0d66520669cefc5e4d3b3b8f28828dc5643cabc2","size":2729,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.1.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1441451806208,"_hasShrinkwrap":false,"_cnpm_publish_time":1441451806208,"_cnpmcore_publish_time":"2021-12-17T00:25:18.669Z"},"1.1.0":{"name":"flat-tree","version":"1.1.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"5b6ba65c81cd423554d4e3cb7625f7a7182d8938","_id":"flat-tree@1.1.0","_shasum":"736f33fc8eef242ad6c9e6cef09e2ab8a239357f","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"736f33fc8eef242ad6c9e6cef09e2ab8a239357f","size":2672,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1437467787906,"_hasShrinkwrap":false,"_cnpm_publish_time":1437467787906,"_cnpmcore_publish_time":"2021-12-17T00:25:18.881Z"},"1.0.1":{"name":"flat-tree","version":"1.0.1","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"6dbc402fbfa6aa282613fff610a3edd5fa523d78","_id":"flat-tree@1.0.1","_shasum":"832ff288dde03c873abc82557464e70d4d6cba7a","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"832ff288dde03c873abc82557464e70d4d6cba7a","size":2581,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1434411787469,"_hasShrinkwrap":false,"_cnpm_publish_time":1434411787469,"_cnpmcore_publish_time":"2021-12-17T00:25:19.098Z"},"1.0.0":{"name":"flat-tree","version":"1.0.0","description":"A series of functions to map a binary tree to a list","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/flat-tree.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"homepage":"https://github.com/mafintosh/flat-tree","gitHead":"7e64bc820bf6d5e17880a05b02a7c0e0ed2454d3","_id":"flat-tree@1.0.0","_shasum":"38e3187415bd7cdc7454918d432d5443268d3238","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"38e3187415bd7cdc7454918d432d5443268d3238","size":2675,"noattachment":false,"key":"/flat-tree/-/flat-tree-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/flat-tree/download/flat-tree-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1434411453261,"_hasShrinkwrap":false,"_cnpm_publish_time":1434411453261,"_cnpmcore_publish_time":"2021-12-17T00:25:19.292Z"}},"readme":"# flat-tree\n\nA series of functions to map a binary tree to a list\n\n```\nnpm install flat-tree\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/flat-tree.svg?style=flat)](http://travis-ci.org/mafintosh/flat-tree)\n\n## Usage\n\nYou can represent a binary tree in a simple flat list using the following structure\n\n```\n      3\n  1       5\n0   2   4   6  ...\n```\n\nThis module exposes a series of functions to help you build and maintain this data structure\n\n``` js\nvar tree = require('flat-tree')\nvar list = []\n\nvar i = tree.index(0, 0) // get array index for depth: 0, offset: 0\nvar j = tree.index(1, 0) // get array index for depth: 1, offset: 0\n\n// use these indexes to store some data\n\nlist[i] = 'a'\nlist[j] = 'b'\nlist[tree.parent(i)] = 'parent of a and b'\n```\n\n## API\n\n#### `index = tree.index(depth, offset)`\n\nReturns an array index for the tree element at the given depth and offset.\n\n#### `parentIndex = tree.parent(index)`\n\nReturns the index of the parent element in tree.\n\n#### `siblingIndex = tree.sibling(index)`\n\nReturns the index of this elements sibling.\n\n#### `children = tree.children(index)`\n\nReturns an array `[leftChild, rightChild]` with the indexes of this elements children.\nIf this element does not have any children it returns `null`.\n\n#### `range = tree.spans(index)`\n\nReturns the range (inclusive) the tree root at `index` spans.\nFor example `tree.spans(3)` would return `[0, 6]` (see the usage example).\n\n#### `index = tree.leftSpan(index)`\n\nReturns the left spanning in index in the tree `index` spans.\n\n#### `index = tree.rightSpan(index)`\n\nReturns the right spanning in index in the tree `index` spans.\n\n#### `count = tree.count(index)`\n\nReturns how many nodes (including parent nodes) a tree contains.\n\n#### `count = tree.countLeaves(index)`\n\nReturns how many nodes (excluding parent nodes) a tree contains.\n\n#### `depth = tree.depth(index)`\n\nReturns the depth of an element.\n\n#### `offset = tree.offset(index, [depth])`\n\nReturns the relative offset of an element.\n\n#### `roots = tree.fullRoots(index)`\n\nReturns a list of all the full roots (subtrees where all nodes have either 2 or 0 children) `<` index.\nFor example `fullRoots(8)` returns `[3]` since the subtree rooted at `3` spans `0 -> 6` and the tree\nrooted at `7` has a child located at `9` which is `>= 8`.\n\n#### `iterator = tree.iterator(index)`\n\nCreate a stateful tree iterator starting at a given index.\nThe iterator exposes the following methods.\n\n#### `index = iterator.next()`\n\nMove the iterator the next item in the tree.\n\n#### `index = iterator.prev()`\n\nMove the iterator the prev item in the tree.\n\n#### `iterator.seek(index)`\n\nMove the iterator the this specific tree index.\n\n#### `index = iterator.parent()`\n\nMove the iterator to the current parent index.\n\n#### `index = iterator.leftChild()`\n\nMove the iterator to the current left child index.\n\n#### `index = iterator.rightChild()`\n\nMove the iterator to the current right child index.\n\n#### `index = iterator.leftSpan()`\n\nMove the iterator to the current left span index.\n\n#### `index = iterator.rightSpan()`\n\nMove the iterator to the current right span index.\n\n#### `bool = iterator.isLeft()`\n\nIs the iterator at a left sibling?\n\n#### `bool = iterator.isRight()`\n\nIs the iterator at a right sibling?\n\n#### `index = iterator.sibling()`\n\nMove the iterator to the current sibling.\n\n#### `count = iterator.count()`\n\nReturns how many nodes (including parent nodes) the current tree contains.\n\n#### `count = iterator.countLeaves()`\n\nReturns how many nodes (excluding parent nodes) the current tree contains.\n\n## See also\n\n- [mafintosh/print-flat-tree][print]: A cli that can pretty print flat-trees.\n- [bcomnes/flattree][ftg]: A port of the node module to Go.\n- [arablocks/flat-tree.c](c): A port of the module to C\n- [datkt/flat-tree][kt]: A port of the module to Kotlin\n- [datrs/flat-tree][rs]: A port to Rust.\n- [bcomnes/flattree][ftg]: A port to Go.\n- [noffle/cl-flat-tree][clft]: A port to Common Lisp.\n\n## License\n\nMIT\n\n[print]: https://github.com/mafintosh/print-flat-tree\n[rs]: https://github.com/datrs/flat-tree\n[ftg]: https://github.com/bcomnes/flattree\n[c]: https://github.com/arablocks/flat-tree.c\n[kt]: https://github.com/datkt/flat-tree\n[clft]: https://github.com/noffle/cl-flat-tree\n","_attachments":{},"homepage":"https://github.com/mafintosh/flat-tree","bugs":{"url":"https://github.com/mafintosh/flat-tree/issues"},"license":"MIT"}