
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
FEEL(Friendly Enough Expression Language) based on DMN specification 1.1 for conformance level 3
FEEL is an expression language based on DMN specification conformance level 3. Written using PEG.js - JavaScript Parser Generator. FEEL is a very powerful language built with the purpose of defining rules in Business Rule Engines. FEEL also offers an API to implement and execute Decision Table defined in excel (.xlsx)
FEEL is a completely flexible library which can be used with any project to add support for Decision Table. It also comes with a powerful expression language termed FEEL built-in to define a multitude of decision rules.
# npm install
npm install js-feel --save
# clone repo
git clone https://github.com/EdgeVerve/feel.git
# or fork repo
# install dependencies
npm install
# run test cases
npm test
# watch for changes in source and grammar
gulp watch
# generate parser from grammar
gulp generate
# lint source files
npm run lint
# lint-fix source files
npm run lintfix
Decision tables are defined in excel (.xlsx). Please check Sample Rules. Each cell in the body of the decision table has to be a valid FEEL expression. The following make use of FEEL parser to parse and execute expressions and hence the decision logic.
const { decisionTable } = require('feel')();
const csv = decisionTable.xls_to_csv('./test/StudentFinancialPackageEligibility.xlsx');
const decision_table = decisionTable.csv_to_decision_table(csv[0]);
The Decision Table (decision_table) created in the previous step can be executed using; decisionTable.execute_decision_table
const payload = {"Student GPA" : 3.6,"Student Extra-Curricular Activities Count" : 4,"Student National Honor Society Membership" : "Yes"};
decisionTable.execute_decision_table("StudentFinancialPackageEligibility", decision_table,payload, (results)=> {
console.log(results)
});
const {feel} = require('feel')();
const rule = 'a + b - c';
const context = {
a: 10,
b: 20,
c: 5
};
const parsedGrammar = feel.parse(rule);
parsedGrammar.build(context).then(result => {
console.log(result);
}).catch(err => console.error(err));
Some valid FEEL expressions (logically categorized):
Please note: This is not a complete list of FEEL Expressions. Please refer DMN Specification Document for detailed documentation on FEEL grammar.
For comprehensive set of documentation on DMN, you can refer to :
FAQs
FEEL(Friendly Enough Expression Language) based on DMN specification 1.1 for conformance level 3
We found that js-feel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.