-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlineadder.js
More file actions
17 lines (15 loc) · 880 Bytes
/
lineadder.js
File metadata and controls
17 lines (15 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
* decrossfuscator - A project to undo the effects of a specific version of Google Closure Compiler for a specific game by mapping between versions.
* Written starting in 2017 by contributors (see CREDITS.txt)
* To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
* You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
// 2:filesource 3:find 4:addline
var fs = require("fs");
var src = fs.readFileSync(process.argv[2], "utf8");
var lines = src.split("\n");
for (var i = 0; i < lines.length; i++) {
console.log(lines[i]);
if (lines[i].indexOf(process.argv[3]) != -1)
console.log(process.argv[4]);
}