(search)
| 48 | } |
| 49 | |
| 50 | find(search) { |
| 51 | const searchFn = TreeNode.iterFunction(TreeNode.searchFunction(search)); |
| 52 | if (searchFn(this)) { |
| 53 | return this; |
| 54 | } |
| 55 | for (let i = 0; i < this.children.length; i++) { |
| 56 | const result = this.children[i].find(search); |
| 57 | if (result) { |
| 58 | return result; |
| 59 | } |
| 60 | } |
| 61 | return null; |
| 62 | } |
| 63 | |
| 64 | getPath(search) { |
| 65 | const searchFn = TreeNode.iterFunction(TreeNode.searchFunction(search)); |
no test coverage detected