UNPKG

@hbtgmbh/dmn-eval-js

Version:

Evaluation of DMN 1.1 decision tables, limited to S-FEEL (Simple Friendly Enough Expression Language)

24 lines (20 loc) 476 B
/* * ©2017-2018 HBT Hamburger Berater Team GmbH * All Rights Reserved. */ /* Decision Model and Notation, v1.1 Page : 133 */ const endsWith = (text, prefix) => { let result; if (prefix === undefined || text === undefined) { result = undefined; } else if (prefix === null || text === null) { result = null; } else { result = text.lastIndexOf(prefix) === text.length - prefix.length; } return result; }; module.exports = { 'ends with': endsWith };