*commonPrefixSearch(text) {
        let node = this.root;
        if (node === undefined) return;

        let prefix = "";
        for (const ch of text) {
            prefix += ch;
            node = node.children.get(ch);
            if (node === undefined) return;
            if (node.isLeaf) {
                yield prefix;
            }
        }
    }
Searches the trie for all strings with a common prefix of `text`.
@param {string} text The common prefix to search for.
@yields {string} Each string in the trie that has `text` as a prefix.