gasStats.js
function getContractNames(filePath){
  const names = [];
  const code = fs.readFileSync(filePath, 'utf-8');
  const ast = parser.parse(code, {tolerant: true});

  parser.visit(ast, {
    ContractDefinition: function(node) {
      names.push(node.name);
    }
  });

  return names;
}
function getContractNames(filePath){
  const names = [];
  const code = fs.readFileSync(filePath, 'utf-8');
  const ast = parser.parse(code, {tolerant: true});

  parser.visit(ast, {
    ContractDefinition: function(node) {
      names.push(node.name);
    }
  });

  return names;
}
function getContractNames ( filePath ) { const names = [ ] ; const code = fs . readFileSync ( filePath , 'utf-8' ) ; const ast = parser . parse ( code , { tolerant : true } ) ; parser . visit ( ast , { ContractDefinition : function ( node ) { names . push ( node . name ) ; } } ) ; return names ; }
Parses files for contract names
@param  {String} filePath path to file
@return {Array}           array of contract names
Parses files for contract names