{"size": 678, "ext": "js", "max_stars_repo_path": "tools/wipe-dependencies.js", "max_stars_repo_name": "sibvrv/libcsg", "max_stars_repo_stars_event_min_datetime": "2020-05-03T10:42:45.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-03T10:42:45.000Z", "max_issues_repo_path": "tools/wipe-dependencies.js", "max_issues_repo_name": "sibvrv/libcsg", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tools/wipe-dependencies.js", "max_forks_repo_name": "sibvrv/libcsg", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.0769230769, "max_line_length": 109, "alphanum_fraction": 0.6710914454}
#!/usr/bin/env node
'use strict';

const fs = require('fs');

const wipeDependencies = () => {
  const file = fs.readFileSync('package.json');
  const content = JSON.parse(file);

  for (var devDep in content.devDependencies) {
    if (content.devDependencies.hasOwnProperty(devDep) && !content.devDependencies[devDep].includes('git')) {
      content.devDependencies[devDep] = '*';
    }
  }

  for (var dep in content.dependencies) {
    if (content.dependencies.hasOwnProperty(dep) && !content.dependencies[dep].includes('git')) {
      content.dependencies[dep] = '*';
    }
  }

  fs.writeFileSync('package.json', JSON.stringify(content, null, 2));
};

wipeDependencies();
