jeffuscator
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -18,8 +18,8 @@ #!/usr/bin/env node | ||
if(program.outputPath) { | ||
var output = program.outputPath | ||
var output = path.join(__dirname, program.outputPath) | ||
} | ||
new Jeffuscator(program.inputPath) | ||
new Jeffuscator(path.join(__dirname, program.inputPath)) | ||
.processFiles(output) | ||
}) | ||
.parse(process.argv) |
{ | ||
"name": "jeffuscator", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Obfuscate JavaScript by renaming all variables and methods to different variations of 'Jeff'.", | ||
@@ -5,0 +5,0 @@ "main": "src/Jeffuscator.js", |
@@ -32,3 +32,10 @@ const fs = require('fs-extra') | ||
if(files.length < 2) { | ||
return files[0].substr(files[0].lastIndexOf('/') || 0) | ||
let pattern = /[\/\\]/g | ||
let lastIndex = 0 | ||
while(pattern.test(files[0]) === true) { | ||
lastIndex = pattern.lastIndex | ||
} | ||
return files[0].substr(0, lastIndex) | ||
} | ||
@@ -35,0 +42,0 @@ else { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33704
516