0.0.4 • Published 11 years ago

tower-js-expressions v0.0.4

Weekly downloads
14
License
-
Repository
-
Last release
11 years ago

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"');

Licence

MIT