mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-22 09:23:34 +08:00
22 lines
396 B
JavaScript
22 lines
396 B
JavaScript
const code = `
|
|
(function(){
|
|
var object = {
|
|
foo: 'test1',
|
|
bar: {
|
|
baz: 'test2'
|
|
}
|
|
};
|
|
})();
|
|
`
|
|
const options = {
|
|
compact: false,
|
|
transformObjectKeys: true
|
|
}
|
|
|
|
const obfuscator = require('javascript-obfuscator')
|
|
|
|
function obfuscate(code, options) {
|
|
return obfuscator.obfuscate(code, options).getObfuscatedCode()
|
|
}
|
|
|
|
console.log(obfuscate(code, options)) |