findMatchesOnPath (search) {
    if (this.cs === false) {
      search = search.toLowerCase()
    }

    function recurse (node, search, stringAgg, resultsAgg) {
      // Check if this is a word.
      if (node.$) {
        resultsAgg.push(stringAgg)
      }

      // Check if the have completed the seearch
      if (search.length === 0) {
        return resultsAgg
      }

      // Otherwise, continue searching
      const next = node.dictionary[search[0]]
      if (!next) {
        return resultsAgg
      }
      return recurse(next, search.substring(1), stringAgg + search[0], resultsAgg)
    };

    return recurse(this, search, '', [])
  }
A function to search the TRIE and return an array of words which were encountered along the way.
This will only return words with full prefix matches.
for example if we had the following words in our database:
a, ab, bc, cd, abc
and we searched the string: abcd
we would get only:
[a, ab, abc]