Comment by zachrip Comment by zachrip 10 hours ago 1 reply Copy Link View on Hacker News Would like to see the eval version - the dialogue version just seems like normal code with extra steps?
Copy Link mavdol04 9 hours ago Collapse Comment - yeah, the previous example was quite basic. I will write a complete example for that, but here is how you can run dynamic code: import { task } from "@capsule-run/sdk"; export default task({ name: "main", compute: "HIGH", }, async () => { const untrustedCode = "const x = 10; x * 2 + 5;"; const result = eval(untrustedCode); return result; }); Hope that helps! Reply View | 0 replies
yeah, the previous example was quite basic. I will write a complete example for that, but here is how you can run dynamic code:
Hope that helps!