{"size": 469, "ext": "js", "max_stars_repo_path": "packages/chisel-shared-utils/lib/package-manager.js", "max_stars_repo_name": "jakub300/generator-chisel", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/chisel-shared-utils/lib/package-manager.js", "max_issues_repo_name": "jakub300/generator-chisel", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/chisel-shared-utils/lib/package-manager.js", "max_forks_repo_name": "jakub300/generator-chisel", "max_forks_repo_forks_event_min_datetime": "2020-10-23T08:30:10.000Z", "max_forks_repo_forks_event_max_datetime": "2020-10-23T08:30:10.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 21.3181818182, "max_line_length": 57, "alphanum_fraction": 0.6695095949}
let $hasYarn;
function hasYarn() {
  if ($hasYarn !== undefined) return $hasYarn;

  const commandExists = require('command-exists');
  $hasYarn = commandExists.sync('yarn');
  return $hasYarn;
}

module.exports.hasYarn = hasYarn;

function installDependencies(opts = {}) {
  const execa = require('execa');

  return execa(hasYarn() ? 'yarn' : 'npm', ['install'], {
    stdio: 'inherit',
    ...opts,
  });
}

module.exports.installDependencies = installDependencies;
