Comparing version 5.0.2 to 5.0.3
'use strict' | ||
const _ = require('lodash') | ||
const matchRule = (rule, action, separator) => { | ||
@@ -49,6 +47,7 @@ const ruleArray = rule.split(separator || '.') | ||
const matchList = (rule, actionsList) => { | ||
const action = _.find(actionsList, {value: rule.when}) | ||
if (action) { | ||
return ((rule.type === undefined && action.type === undefined) || action.type === rule.type) && | ||
((rule.confidence === undefined && action.confidence === undefined) || action.confidence > rule.confidence) | ||
for (var i = 0; i < actionsList.length; i++) { | ||
if (matchOne(rule.when, actionsList[i].value)) { | ||
return ((rule.type === undefined && actionsList[i].type === undefined) || actionsList[i].type === rule.type) && | ||
((rule.confidence === undefined && actionsList[i].confidence === undefined) || actionsList[i].confidence > rule.confidence) | ||
} | ||
} | ||
@@ -55,0 +54,0 @@ return false |
{ | ||
"name": "flowx", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19672