Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just ship https://github.com/NeilFraser/JS-Interpreter and you’re good to go! /s


As a follow-up: Angular actually did this! https://docs.angularjs.org/guide/expression

> AngularJS does not use JavaScript's eval() to evaluate expressions. Instead AngularJS's $parse service processes these expressions.


Note that those are the AngularJS aka ”Angular 1” docs.

For Angular as in ”Angular 2” docs, see https://angular.dev/guide/templates/expression-syntax


Looks like they actually went this route, but implemented it from scratch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: