Comparing version 0.0.9 to 0.0.10
@@ -8,4 +8,4 @@ | ||
* zswang (http://weibo.com/zswang) | ||
* @version 0.0.9 | ||
* @date 2015-08-26 | ||
* @version 0.0.10 | ||
* @date 2015-09-07 | ||
*/ | ||
@@ -145,4 +145,13 @@ var esprima = require('esprima'); | ||
if (obj.type === 'Literal') { | ||
code = code.slice(0, obj.range[0]) + propertys[obj.$name] + | ||
code.slice(obj.range[1]); | ||
var begin = code.slice(0, obj.range[0]); | ||
var end = code.slice(obj.range[1]); | ||
code = begin; | ||
if (/[^\s~!%^&*()_+\-={}\[\]|:";'<>,.?]$/.test(begin)) { // compress | ||
code += ' '; | ||
} | ||
code += propertys[obj.$name]; | ||
if (/^[^\s~!%^&*()_+\-={}\[\]|:";'<>,.?]/.test(end)) { | ||
code += ' '; | ||
} | ||
code += end; | ||
} | ||
@@ -149,0 +158,0 @@ else { // if (obj.type === 'MemberExpression') { |
{ | ||
"name": "jfogs", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Javascript code obfuscator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
13487
361