searchNodeIds(nodes, predicate) {
    let filtered = []
    for (let node of nodes) {
      if (predicate(node)) {
        filtered.push(node.id)
      }
      if (node.children) {
        filtered = filtered.concat(this.searchNodeIds(node.children, predicate))
      }
    }
    return filtered
  }
/**
  * Search node identifiers using a predicate on nodes
  */
Search node identifiers using a predicate on nodes
Search node identifiers using a predicate on nodes
searchNodeIds(nodes, predicate) {
    let filtered = []
    for (let node of nodes) {
      if (predicate(node)) {
        filtered.push(node.id)
      }
      if (node.children) {
        filtered = filtered.concat(this.searchNodeIds(node.children, predicate))
      }
    }
    return filtered
  }
searchNodeIds ( nodes , predicate ) { let filtered = [ ] for ( let node of nodes ) { if ( predicate ( node ) ) { filtered . push ( node . id ) } if ( node . children ) { filtered = filtered . concat ( this . searchNodeIds ( node . children , predicate ) ) } } return filtered }
Search node identifiers using a predicate on nodes
Search node identifiers using a predicate on nodes