Comparing version 0.0.5 to 0.0.6
@@ -86,3 +86,2 @@ var PropertyModify = require('./src/PropertyModify'); | ||
var prev = vardecl.prev(); | ||
var includeVar = false; | ||
//包括var关键字需要将var一起删除 | ||
@@ -89,0 +88,0 @@ if(prev && prev.name() == JsNode.TOKEN && prev.token().content() == 'var') { |
@@ -9,7 +9,7 @@ { | ||
], | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "javascript encrypt&confusion", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "make test" | ||
}, | ||
@@ -37,3 +37,3 @@ "config": { | ||
"dependencies": { | ||
"homunculus": "0.1.7" | ||
"homunculus": "0.1.8" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
@@ -25,4 +25,4 @@ ## javascript encrypt&confusion | ||
<br/>将js代码code混淆难度并返回,这并不会修改代码的任何逻辑 | ||
<br/>作为代价它会一定程度上增加js体积以及消耗更多的性能 | ||
<br/>作为代价它会一定程度上增加js体积以及消耗更多的性能,体积gzip后大概会增加3倍,性能未知 | ||
<br/>original默认false会在代码前置入一段脚本,扩展原生对象,一般也是安全的,除非和代码本身的扩展冲突 | ||
<br/>original设置true时不会有上述扩展,但会减小混淆力度 |
@@ -261,3 +261,7 @@ var anbu = require('../'); | ||
}); | ||
describe('jslib tests', function() { | ||
describe.only('jslib tests', function() { | ||
var dist = path.join(__dirname, './dist'); | ||
if(!fs.existsSync(dist)) { | ||
fs.mkdirSync(dist); | ||
} | ||
describe('seajs-debug', function() { | ||
@@ -267,3 +271,3 @@ var s = fs.readFileSync(path.join(__dirname, './lib/sea-debug.js'), { encoding: 'utf-8' }); | ||
var res = anbu.encrypt(s, true); | ||
fs.writeFileSync(path.join(__dirname, './lib/sea-debug-encrypt.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/sea-debug-encrypt.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -274,3 +278,3 @@ }); | ||
var res = anbu.encrypt(s); | ||
fs.writeFileSync(path.join(__dirname, './lib/sea-debug-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/sea-debug-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -283,3 +287,3 @@ }); | ||
var res = anbu.encrypt(s, true); | ||
fs.writeFileSync(path.join(__dirname, './lib/sea-encrypt.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/sea-encrypt.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -290,3 +294,3 @@ }); | ||
var res = anbu.encrypt(s); | ||
fs.writeFileSync(path.join(__dirname, './lib/sea-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/sea-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -299,3 +303,3 @@ }); | ||
var res = anbu.encrypt(s, true); | ||
fs.writeFileSync(path.join(__dirname, './lib/jquery-encrypt.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/jquery-encrypt.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -306,3 +310,3 @@ }); | ||
var res = anbu.encrypt(s); | ||
fs.writeFileSync(path.join(__dirname, './lib/jquery-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/jquery-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -315,3 +319,3 @@ }); | ||
var res = anbu.encrypt(s, true); | ||
fs.writeFileSync(path.join(__dirname, './lib/jquery-min-encrypt.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/jquery-min-encrypt.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -322,3 +326,3 @@ }); | ||
var res = anbu.encrypt(s); | ||
fs.writeFileSync(path.join(__dirname, './lib/jquery-min-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
fs.writeFileSync(path.join(__dirname, './dist/jquery-min-encrypt-plus.js'), res, { encoding: 'utf-8' }); | ||
expect(res).to.not.eql(s); | ||
@@ -325,0 +329,0 @@ }); |
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
Obfuscated code
Supply chain riskObfuscated files are intentionally packed to hide their behavior. This could be a sign of malware.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Obfuscated code
Supply chain riskObfuscated files are intentionally packed to hide their behavior. This could be a sign of malware.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
8744229
36
51903
1
28
+ Addedhomunculus@0.1.8(transitive)
- Removedhomunculus@0.1.7(transitive)
Updatedhomunculus@0.1.8