{"size": 395, "ext": "js", "max_stars_repo_path": "lib/required-modules.js", "max_stars_repo_name": "intervolga/eval-loader", "max_stars_repo_stars_event_min_datetime": "2018-07-09T23:42:43.000Z", "max_stars_repo_stars_event_max_datetime": "2018-07-09T23:42:43.000Z", "max_issues_repo_path": "lib/required-modules.js", "max_issues_repo_name": "intervolga/eval-loader", "max_issues_repo_issues_event_min_datetime": "2021-03-08T16:52:42.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-06T19:47:43.000Z", "max_forks_repo_path": "lib/required-modules.js", "max_forks_repo_name": "intervolga/eval-loader", "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": 20.7894736842, "max_line_length": 61, "alphanum_fraction": 0.7139240506}
/**
 * Generate list of modules required by parentModule
 *
 * @param {Object} parentModule
 * @return {Array}
 */
function requiredModules(parentModule) {
  let required = [];

  parentModule.children.forEach((childModule) => {
    required = required.concat(requiredModules(childModule));
    required.push(childModule.filename);
  });

  return required;
}

module.exports = requiredModules;
