{"size": 377, "ext": "js", "max_stars_repo_path": "request/index.js", "max_stars_repo_name": "codacy-badger/node-client", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "request/index.js", "max_issues_repo_name": "codacy-badger/node-client", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "request/index.js", "max_forks_repo_name": "codacy-badger/node-client", "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.9285714286, "max_line_length": 76, "alphanum_fraction": 0.6631299735}
var child_process = require('child_process')

module.exports = function(data) {
  const response = child_process.spawnSync(__dirname + "/request.js", [], { 
    encoding: 'ascii',
    input: JSON.stringify(data)
  })
    
  if(response.stderr !== null && response.stderr.length > 0) {
    throw new Error(response.stderr)
  } else {
    return JSON.parse(response.stdout)
  }
}