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).

npm install tower-js-expressions
1 downloads in the last day
7 downloads in the last week
13 downloads in the last month

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).

Installation

node.js:

$ npm install tower-js-expressions

browser:

$ component install tower/js-expressions

Example

var expression = require('tower-js-expressions');

var ast = expression('conditional').parse('isLoggedIn ? "Logged in" : "Log in"');

Notes

Licence

MIT

npm loves you