Skip to content

Commit 17feb63

Browse files
committed
Anonymize: Remove "let" from loop; Doing so does not affect the existing
programming logic. for (let j = 0; j < process.argv.length; j++) { ^^^ [java] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode [java] at exports.runInThisContext (vm.js:53:16) [java] at Module._compile (module.js:374:25) [java] at Object.Module._extensions..js (module.js:417:10) [java] at Module.load (module.js:344:32) [java] at Function.Module._load (module.js:301:12) [java] at Function.Module.runMain (module.js:442:10) [java] at startup (node.js:136:18) [java] at node.js:966:3
1 parent 90ba81c commit 17feb63

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Anonymize/program/hash.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ workingDir = process.argv[process.argv.indexOf("-workingDir") + 1];
2424

2525
'use strict';
2626
csvFilePath = null;
27-
for (let j = 0; j < process.argv.length; j++) {
27+
for (j = 0; j < process.argv.length; j++) {
2828
if (process.argv[j] == "-node") {
2929
if (process.argv[j + 1] == "0") {
3030
csvFilePath = process.argv[j + 4];
@@ -50,7 +50,7 @@ if (workingDir == null || workingDir == '') {
5050

5151
var csvFile = fs.readFileSync(csvFilePath, { encoding: 'binary' });
5252

53-
// Parse the csv file and
53+
// Parse the csv file and
5454
Papa.parse(csvFile, {
5555
header: true,
5656
complete: function(results) {
@@ -64,7 +64,7 @@ Papa.parse(csvFile, {
6464
}
6565

6666
for (var i = 0; i < results.data.length; i++) {
67-
// In case the .csv has extra blank rows being parsed somewhere in the file,
67+
// In case the .csv has extra blank rows being parsed somewhere in the file,
6868
// ensure it won't hash cells with just spaces/tabs/etc.
6969
var username = results.data[i][column];
7070
if (username && username.trim()) {
@@ -79,7 +79,7 @@ Papa.parse(csvFile, {
7979

8080
var newFile = Papa.unparse(results);
8181

82-
// Create output file in the output directory
82+
// Create output file in the output directory
8383
// (needs to match up with file in AnonymizeMain.java)
8484
var outputWriter = fs.createWriteStream(workingDir + "AnonymizedData.csv");
8585

0 commit comments

Comments
 (0)