taskfile.js
function getJSON(filepath) {
  const jsonString = "g = " + fs.readFileSync(filepath, 'utf8') + "; g";
  return (new vm.Script(jsonString)).runInNewContext();
}
function getJSON(filepath) {
  const jsonString = "g = " + fs.readFileSync(filepath, 'utf8') + "; g";
  return (new vm.Script(jsonString)).runInNewContext();
}
function getJSON ( filepath ) { const jsonString = "g = " + fs . readFileSync ( filepath , 'utf8' ) + "; g" ; return ( new vm . Script ( jsonString ) ) . runInNewContext ( ) ; }
Gobble up a JSON file with comments
Gobble up a JSON file with comments