bytenode/bytenode

Uncaught SyntaxError: Invalid or unexpected token

82318179 opened this issue · 1 comments

const abc = () => {
console.log('我知道了')
}
mytest.eval(abc.toString())

After using code protection, the above codes report the following error
Uncaught SyntaxError: Invalid or unexpected token

fn.tostring() is not work in code protection ,how to fix this error

Bytenode works by removing your plain source code, so by definition it breaks the Function.prototype.toString() function.

This is mentioned in the README file.