{"size": 733, "ext": "js", "max_stars_repo_path": "src/common/utils.js", "max_stars_repo_name": "zhanghui-chinamobile/CRM", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/common/utils.js", "max_issues_repo_name": "zhanghui-chinamobile/CRM", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/common/utils.js", "max_forks_repo_name": "zhanghui-chinamobile/CRM", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.1785714286, "max_line_length": 59, "alphanum_fraction": 0.5388813097}
export function getCurrentMenu (location, arrayMenu) {
  if (!!arrayMenu) {
    let current = [];
    for (let i = 0; i < arrayMenu.length; i++) {
      const e = arrayMenu[ i ];
      const child = getCurrentMenu(location, e.children);
      if (!!child && child.length > 0) {
        child.push({ ...e, children: null });
        return child;
      }
      if (e.href && pathToRegexp(e.href).exec(location)) {
        current.push({ ...e, children: null });
        return current;
      }
    }
    return current;
  }
  return null;
}

//根据key找到对应的值
export function getValueByKey(key, array) {
  for(let i=0;i<array.length;i++) {
    if(array[i].value == key) {
      return array[i].text;
    }
  }
}