tower-js-expressions

Parse strings into executable JavaScript expressions (for directives). This is used internally, but you could use this thing as a base for a custom JS-like language (such as in extending CSS).

JavaScript Expressions

Parse strings into executable JavaScript expressions (for directives). This is used internally, but you could use this thing as a base for a custom JS-like language (such as in extending CSS).

node.js:

$ npm install tower-js-expressions

browser:

$ component install tower/js-expressions
var expression = require('tower-js-expressions');
 
var ast = expression('conditional').parse('isLoggedIn ? "Logged in" : "Log in"');
  • would be cool to do something like this too: http://maryrosecook.com/post/little-lisp-interpreter

MIT