- options
Object
The options - cb
Function
Callback:function (err, obfuscated)
Obfuscate and concatenate a NodeJS "package" because corporate says so.
- files
Array
The files contained in the package - root
String
The root of the package - entry
String
The entry point - [strings]
Boolean
Shall strings be obfuscated
Object
Create an options
object for the obfuscator
Aliases (for back-compat):
Options
ObfuscatorOptions
Examples:
var opts = new obfuscator.Options(
// files
[ './myfile.js', './mydir/thing.js'],
// root
'./',
// entry
'myfile.js',
// strings
true)
var opts = obfuscator.options({...})
- str
String
String
Convert (or obfuscate) a string to its escaped
hexidecimal representation. For example,
hex('a')
will return '\x63'
.
- js
String
String
Mangle simple strings contained in some js
Strings will be mangled by replacing each contained character with its escaped hexidecimal representation. For example, "a" will render to "\x63".
Strings which contain non-alphanumeric characters
other than .-_/
will be ignored.
Strings not wrapped in double quotes will be ignored.
Example:
utils.strings('var foo = "foo"';);
//=> 'var foo = "\x66\x6f\x6f";'