eval5 is based solely on written JavaScript JavaScript interpreter, support ECMA5 grammar. JavaScript does not support commonly used in the operating environment eval / Function, for example: small micro-channel program
The updates are as follows :
- Interpreter.prototype.evaluate cancel the second argument context, context specified when the instance of unity
- Interpreter.prototype.evaluate新增别名Interpreter.prototype.appendCode
- Multiple calls to evaluate or cause confusion function.toString same instance under repair
import { Interpreter } from 'eval5';
const interpreter = new Interpreter(window);
interpreter.evaluate('alert(1+1)');
Experience Address: https://bplok20010.github.io/eval5
Project Address: https://github.com/bplok20010/eval5