function dfs(name) {
        if (visited.has(name)) {
            return;
        }

        visited.add(name);
        const dependencies = objects.find(item => item.name === name)?.dependencies || [];
        for (const dependency of dependencies) {
            dfs(dependency);
        }

        result.push(objects.find(item => item.name === name));
    }
This sorting algorithm is used to make sure that dependent tables are imported after their dependencies.
@param {Array<Object>} objects Objects with a name and dependencies properties
@returns Topologically sorted array of objects