mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-19 18:24:51 +08:00
17 lines
336 B
JavaScript
17 lines
336 B
JavaScript
const code = `
|
|
let hello = '1' + 1
|
|
console.log('hello', hello)
|
|
`
|
|
|
|
const options = {
|
|
compact: true,
|
|
identifierNamesGenerator: 'mangled'
|
|
}
|
|
|
|
const obfuscator = require('javascript-obfuscator')
|
|
|
|
function obfuscate(code, options) {
|
|
return obfuscator.obfuscate(code, options).getObfuscatedCode()
|
|
}
|
|
|
|
console.log(obfuscate(code, options)) |