# feel-interpreter

> An interpreter for FEEL language

Latest version **1.0.1** (published 2022-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install feel-interpreter
pnpm add feel-interpreter
yarn add feel-interpreter
bun add feel-interpreter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-03-27 |
| First published | 2022-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Pedro Assis |
| Maintainers | pedropereiraassis |
| Keywords | FEEL, interpreter |

## Links

- npm: https://www.npmjs.com/package/feel-interpreter
- Repository: https://github.com/pedropereiraassis/feel-interpreter
- Homepage: https://github.com/pedropereiraassis/feel-interpreter#readme
- Issues: https://github.com/pedropereiraassis/feel-interpreter/issues
- npm.io page: https://npm.io/package/feel-interpreter

## Recent versions

- 1.0.1 (latest) — 2022-03-27
- 1.0.0 — 2022-03-27

## README

# feel-interpreter
feel-interpreter, like the name tells, is an interpreter of FEEL (Friendly Enough Expression Language) language. It works converting the expression written in FEEL into decision logics to return what is expected. FEEL is an expression language based on DMN specification and is a very powerful language built with the purpose of defining rules in Business Rule Engines.

## Installation
Installation is done using the npm install command:

```
$ npm install feel-interpreter
```
## Example Usage

```js
const { convertExpression } = require("feel-interpreter");

const numberComparison = convertExpression("124 in (>=124)");

console.log(numberComparison);
// the output will be: true

const nameInList = convertExpression("Alice in ['Arthur', 'Brad', 'John']");

console.log(nameInList);
// the output will be: false
```

## Valid FEEL expressions (for now)

```
5 in (<=5)
5 in (>=5)
8++
Brad in ['Arthur', 'Brad', 'John']
Dish==Dish
Dish==Dish and Steak==Steak
Dish==Dish and Steak==Steak and Soda==Soda
Dish==Dish or Steak==Steak
Dish==Dish or Steak==Steak or Soda==Soda
If Car==Car then Car else Bike
```

---
_Source: https://npm.io/package/feel-interpreter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
