feelin
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

feelin

CI

A DMN FEEL parser and interpreter written in JavaScript. ➡️ Try it out.

Usage

import {
  unaryTest,
  evaluate
} from 'feelin';

unaryTest('1', { '?': 1 }); // true
unaryTest('[1..end]', { '?': 1, end: 10 }); // true

evaluate("Mike's dauther.name", {
  'Mike\'s dauther.name': 'Lisa'
}); // "Lisa"

evaluate('for a in [1, 2, 3] return a * 2'); // [ 2, 4, 6 ]

evaluate('every rate in rates() satisfies rate < 10', {
  rates() {
    return [ 10, 20 ];
  }
}); // false

Features

  • [x] Recognizes full FEEL grammar
  • [x] Context sensitive (incl. names with spaces)
  • [x] Recovers on errors
  • [x] Temporal types and operations
  • [x] Built-in FEEL functions
  • [ ] Full DMN TCK compliance

Build and Run

# build the library and run all tests
npm run all

# spin up for local development
npm run dev

# execute FEEL tests in DMN TCK
npm run tck

Related

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i feelin

Weekly Downloads

11,925

Version

3.1.0

License

MIT

Unpacked Size

425 kB

Total Files

14

Last publish

Collaborators

  • nikku