@jonnsl/interprete
v0.0.1
Published
Simple expression evaluator in typescript
Downloads
5
Readme
Interprete
Simple expression evaluator in typescript
- Math operators + - * /
- Boolean operators (or || and &&)
- Comparisons (= != < > <= >=)
Examples
import evaluate from '@jonnsl/interprete';
const expression = 'year < 2004';
const result = evaluate(input, { year: '10' }); // result === true
Installation
npm install --save interprete
License
This project is licensed under the MIT License - see LICENSE for details.