From f56b42d91ff13a1520d96cb5eefbcfcd1dfbad46 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 5 Apr 2018 11:41:28 -0400 Subject: [PATCH] Linting --- lib/cmds/graph.js | 14 +++++++------- package-lock.json | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/cmds/graph.js b/lib/cmds/graph.js index ef401111..7621fe65 100644 --- a/lib/cmds/graph.js +++ b/lib/cmds/graph.js @@ -39,16 +39,16 @@ class GraphGenerator { break; case 'constructor': contractLabel += "«constructor»("; - for(let j = 0; j < this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs.length; j++){ - contractLabel += (j == 0 ? "" : ", ") + this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs[j].type; - } + this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs.forEach(function(elem, index){ + contractLabel += (index == 0 ? "" : ", ") + elem.type; + }); contractLabel += ")\\l"; break; case 'event': contractLabel += "«event»" + this.engine.contractsManager.contracts[contract].abiDefinition[i].name + "("; - for(let j = 0; j < this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs.length; j++){ - contractLabel += (j == 0 ? "" : ", ") + this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs[j].type; - } + this.engine.contractsManager.contracts[contract].abiDefinition[i].inputs.forEach(function(elem, index){ + contractLabel += (index == 0 ? "" : ", ") + elem.type; + }); contractLabel += ")\\l"; break; default: break; @@ -63,7 +63,7 @@ class GraphGenerator { } } - let others = '' + let others = ''; if(!this.engine.contractsManager.contracts[contract].deploy){ others = 'fontcolor="#c3c3c3", color="#a0a0a0"'; tooltip += " (not deployed)"; diff --git a/package-lock.json b/package-lock.json index e2e62dd0..188cefdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10063,6 +10063,11 @@ "extsprintf": "1.3.0" } }, + "viz.js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/viz.js/-/viz.js-1.8.1.tgz", + "integrity": "sha512-KrSNgnIxec+JCAqDPliO6xYA69ToH2WTYB2Kbt8Bp/XRUvm23rTyfffFi4rvQLFkIRNUz/xCnnqhh/gChhsgGA==" + }, "vlq": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",