{"size": 522, "ext": "js", "max_stars_repo_path": "src/util/handleJsonExport.js", "max_stars_repo_name": "navikt/WebARXaaS", "max_stars_repo_stars_event_min_datetime": "2019-08-08T07:34:00.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-08T07:34:00.000Z", "max_issues_repo_path": "src/util/handleJsonExport.js", "max_issues_repo_name": "navikt/WebARXaaS", "max_issues_repo_issues_event_min_datetime": "2020-04-02T04:50:08.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-02T09:57:37.000Z", "max_forks_repo_path": "src/util/handleJsonExport.js", "max_forks_repo_name": "navikt/WebARXaaS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 75, "max_forks_count": null, "avg_line_length": 52.2, "max_line_length": 112, "alphanum_fraction": 0.7509578544}
export default function handleJsonExport(objectToExport, fileName, newFileName, alternateFileName) {
  const json = JSON.stringify(objectToExport);
  const element = document.createElement('a');
  const jsonData = new Blob([json], { type: 'application/json' });
  element.href = URL.createObjectURL(jsonData);
  element.download = fileName ? fileName.toString().replace('.csv', '').concat(newFileName) : alternateFileName;
  document.body.appendChild(element); // Required for this to work on Firefox
  element.click();
}
