TypeScript Expression Language Demo
Live Demo: Testing the published package from npm
Package:
@andreasnicolaou/typescript-expression-language
CDN Source:
https://unpkg.com/@andreasnicolaou/typescript-expression-language/dist/index.umd.min.js
Loading...
Global Variable: typescriptExpressionLanguage
Try It Yourself
Choose an example:
-- Select an example --
Basic Context Example
Basic Math: (x + y) * 2
String Concatenation
Array Access: items[0] + items[2] + items[4]
Object Access: Conditional location
User is adult and active
Order is paid and total over 100
Environment is production
Check for user role
Nested object comparison
Array length check
Conditional string output
Math and logic combo
Use custom function (square)
Simple mathematical expression
Invalid Expression
Expression:
Variables (JSON format):
Evaluate Expression