nodeMatchesText(searchText, node) {
    if (node.state && node.state.hidden === true) return false
    if (!node.searchIndex) node.searchIndex = createSearchIndex(node)

    // Split search text by spaces to get a list of terms
    let searchTerms = searchText.trim().split(/\s+/)

    // Every terms should match the current node
    return Arrays.every(
      searchTerms,

      // Some of the index value should match the search term
      (searchTerm) => Arrays.some(
        node.searchIndex,
        (value) => valueMatches(value, searchTerm)
      )
    )
  }
/**
   * Predicate function returning true if the node matches the searched text
   */
Predicate function returning true if the node matches the searched text
Predicate function returning true if the node matches the searched text
nodeMatchesText(searchText, node) {
    if (node.state && node.state.hidden === true) return false
    if (!node.searchIndex) node.searchIndex = createSearchIndex(node)
    let searchTerms = searchText.trim().split(/\s+/)
    return Arrays.every(
      searchTerms,
      (searchTerm) => Arrays.some(
        node.searchIndex,
        (value) => valueMatches(value, searchTerm)
      )
    )
  }
nodeMatchesText ( searchText , node ) { if ( node . state && node . state . hidden === true ) return false if ( ! node . searchIndex ) node . searchIndex = createSearchIndex ( node ) let searchTerms = searchText . trim ( ) . split ( / \s+ / ) return Arrays . every ( searchTerms , ( searchTerm ) => Arrays . some ( node . searchIndex , ( value ) => valueMatches ( value , searchTerm ) ) ) }
Predicate function returning true if the node matches the searched text
Predicate function returning true if the node matches the searched text
// Split search text by spaces to get a list of terms // Every terms should match the current node // Some of the index value should match the search term