function searchTree(parentNode, paths) {
    let searchTerm = paths.shift();
    // empty search, no matches found
    if (searchTerm == undefined) {
        return [];
    }

    let node = parentNode.get(searchTerm);

    // found exact directory match
    let results = []
    if (node != undefined) {
        return searchTree(node, paths);
    }

    // handle regex symbols
    let escapedSearch = searchTerm.
        replaceAll(/[!$()*+,-./:?\[\]^{|}.\\]/gu, c => `\\${c}`);

    try {
        "".search(escapedSearch)
    } catch (error) {
        // still need to handle any errors we
        // might've missed; catch, log, and stop
        console.log(error);
        return results;
    }

    // no exact match, do fuzzy search
    parentNode.forEach((_, dir) => {
        if (dir.search(escapedSearch) > -1) {
            results.push(dir);
        }
    });
    return results;
}
Sends a 'tree' request to the host application
@since 3.8.0

@throws {error} host response errors

@param {object} settings Settings object
@returns {object} object of Trees with storeId as keys