{"size": 328, "ext": "js", "max_stars_repo_path": "src/logic/get-html-and-component-child-templates.logic.js", "max_stars_repo_name": "AlsoNowhere/dill", "max_stars_repo_stars_event_min_datetime": "2019-10-09T18:48:14.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-09T18:48:14.000Z", "max_issues_repo_path": "src/logic/get-html-and-component-child-templates.logic.js", "max_issues_repo_name": "AlsoNowhere/dill", "max_issues_repo_issues_event_min_datetime": "2019-11-18T11:41:53.000Z", "max_issues_repo_issues_event_max_datetime": "2019-11-18T11:41:53.000Z", "max_forks_repo_path": "src/logic/get-html-and-component-child-templates.logic.js", "max_forks_repo_name": "AlsoNowhere/dill", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 27.3333333333, "max_line_length": 76, "alphanum_fraction": 0.637195122}
import { forEach } from "sage-library"

export const getHtmlAndComponentChildTemplates = (templates, arr = []) => {
    forEach(templates, template => {
        arr.push(template);
        if (template.Component) {
            getHtmlAndComponentChildTemplates(template.childTemplates, arr);
        }
    });
    return arr;
}
