keysWithPrefix (prefix) {
    if (this.caseSensitive === false) {
      prefix = prefix.toLowerCase()
    }

    function isEmpty (object) {
      for (const key in object) if (object[key]) return false
      return true
    }

    function get (node, word) {
      if (!node) return null
      if (word.length === 0) return node
      return get(node.dictionary[word[0]], word.substring(1))
    }

    function recurse (node, stringAgg, resultsAgg) {
      if (!node) return

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

      if (isEmpty(node.dictionary)) {
        return
      }

      for (const c in node.dictionary) {
        recurse(node.dictionary[c], stringAgg + c, resultsAgg)
      }
    }

    const results = []
    recurse(get(this, prefix), prefix, results)
    return results
  }
A function to search the TRIE and return an array of
words which have same prefix <prefix>
for example if we had the following words in our database:
a, ab, bc, cd, abc, abd
and we search the string: a
we will get :
[a, ab, abc, abd]