mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-23 03:09:21 +08:00
15 lines
288 B
JavaScript
15 lines
288 B
JavaScript
const code = `
|
|
console.log('hello world')
|
|
`
|
|
|
|
const options = {
|
|
target: 'browser-no-eval'
|
|
}
|
|
|
|
const obfuscator = require('javascript-obfuscator')
|
|
|
|
function obfuscate(code, options) {
|
|
return obfuscator.obfuscate(code, options).getObfuscatedCode()
|
|
}
|
|
|
|
console.log(obfuscate(code, options)) |