Esel 1.2

ECMAScript Expression Language

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!

What's new in Esel 1.0:

  • Minor code and documentation cleanups.
  • First stable release.
Read full changelog
send us
an update
LGPL v3 (GNU Lesser General Public Lic... 
Rob King
ROOT \ Utilities
Esel is an expression language for JavaScript. It is a language that can be embedded in a JavaScript or ECMAScript program to provide for the evaluation of simple expressions and for text templating.

An Introductory Example

The following is a simple Esel expression:

    The sum of 2 and 2 is ${2 + 2}.

Note that the entire string is an expression. Its value is:

    The sum of 2 and 2 is 4.

This example illustrates how simple Esel really is. Any string is a valid Esel
expression, whose value is the string itself. If the string contains anything
enclosed by "${" and "}", that text is replaced by the value of the expression
between the two delimiters.


Esel was primarily created for the < a href="" >JSONForms< /a > web interface toolkit, but it has many uses beyond that:

An in-browser expression language.

Certain rich web applications allow for small, user-defined programs. Generally, these programs are either plain JavaScript, or some small domain specific language. Allowing the user to input JavaScript creates a whole host of problems: scoping issues, overwriting of important variables, and exception handling issues, among others. Esel removes these concerns by ensuring only valid expressions are used. Esel does not allow assignment, so no variables are clobbered. Esel strictly limits the visible namespace and available functions to those explicitly exported by the application.

A simple templating language.

Not all web browsers support XSLT, and not all users want to use it. Esel provides a simple templating language that can be used within a web page, on the web browser itself. This functionality is used extensively by < a href="" >JSONForms< /a >.

Last updated on September 30th, 2009

#expression language #expressions evaluator #JavaScript #expression #language #ECMAScript

Add your review!