Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 | 1x 1x 664x 664x | /* eslint-disable no-console */
import vm from 'vm';
export function runScript(code: string, context?: vm.Context) {
try {
return vm.runInNewContext(code, context);
} catch (error) {
console.error('运行脚本错误');
}
}
|