jsp-el
v0.0.1
Published
Parse and exec JSP EL expresson in JS.
Downloads
10
Readme
jsp-el.js
Parse and exec JSP EL expression in JS.
Usage
const { parse, exec } = require('jsp-el')
const ast = parse('luobo.age gt 18')
const data = {
age: 8
}
console.log(exec(ast, data)) // false
API
parse(expr)
params
- expr: String, EL expression
return
Object of AST Node.
exec(ast, data)
params
- ast: Object of AST Node.
- data: Object of data to exec EL expression.
return
Anything, the result of EL expression.