mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-22 09:23:34 +08:00
17 lines
321 B
JavaScript
17 lines
321 B
JavaScript
const code = `
|
|
var $ = function(id) {
|
|
return document.getElementById(id);
|
|
};
|
|
`
|
|
|
|
const options = {
|
|
renameGlobals: true
|
|
}
|
|
|
|
const obfuscator = require('javascript-obfuscator')
|
|
|
|
function obfuscate(code, options) {
|
|
return obfuscator.obfuscate(code, options).getObfuscatedCode()
|
|
}
|
|
|
|
console.log(obfuscate(code, options)) |