{"size": 556, "ext": "js", "max_stars_repo_path": "scripts/open.js", "max_stars_repo_name": "danieldogeanu/right-type", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "scripts/open.js", "max_issues_repo_name": "danieldogeanu/right-type", "max_issues_repo_issues_event_min_datetime": "2022-02-02T10:57:56.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-02T10:57:56.000Z", "max_forks_repo_path": "scripts/open.js", "max_forks_repo_name": "danieldogeanu/right-type", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 34.75, "max_line_length": 88, "alphanum_fraction": 0.7032374101}
const {execSync} = require('child_process');

const os = process.platform;
const coveragePath = './coverage/index.html';

/**
 * Cross-platform commands for openning file in default browser.
 * If you use other OS besiders Windows, Mac OS, or Linux, add it to the list.
 */
switch (os) {
  case 'win32': execSync(`start ${coveragePath}`); break;
  case 'darwin': execSync(`open ${coveragePath}`); break;
  case 'linux': execSync(`xdg-open ${coveragePath}`); break;
  default: console.error('Your OS is not supported for openning coverage file!'); break;
}
