json-rules-engine
Advanced tools
Comparing version 2.0.0-beta1 to 2.0.0-beta2
@@ -26,3 +26,3 @@ 'use strict'; | ||
var selectn = require('selectn'); | ||
var isPlainObject = require('lodash.isplainobject'); | ||
var isObjectLike = require('lodash.isobjectlike'); | ||
var warn = require('debug')('json-rules-engine:warn'); | ||
@@ -171,3 +171,3 @@ | ||
if (path) { | ||
if (isPlainObject(factValue) || Array.isArray(factValue)) { | ||
if (isObjectLike(factValue)) { | ||
factValue = selectn(path)(factValue); | ||
@@ -174,0 +174,0 @@ debug('condition::evaluate extracting object property ' + path + ', received: ' + factValue); |
@@ -14,3 +14,3 @@ 'use strict'; | ||
var debug = require('debug')('json-rules-engine'); | ||
var isPlainObject = require('lodash.isplainobject'); | ||
var isObjectLike = require('lodash.isobjectlike'); | ||
@@ -101,3 +101,3 @@ var Condition = function () { | ||
if (!(isPlainObject(value) && value.hasOwnProperty('fact'))) { | ||
if (!(isObjectLike(value) && value.hasOwnProperty('fact'))) { | ||
_context.next = 5; | ||
@@ -104,0 +104,0 @@ break; |
@@ -14,3 +14,3 @@ | ||
[Results](#Results) | ||
[Rule Results](#rule-results) | ||
@@ -17,0 +17,0 @@ ## Methods |
{ | ||
"name": "json-rules-engine", | ||
"version": "2.0.0-beta1", | ||
"version": "2.0.0-beta2", | ||
"description": "Rules Engine expressed in simple json", | ||
@@ -70,3 +70,3 @@ "main": "dist/index.js", | ||
"lodash.clonedeep": "~4.5.0", | ||
"lodash.isplainobject": "~4.0.6", | ||
"lodash.isobjectlike": "~4.0.0", | ||
"object-hash": "~1.1.8", | ||
@@ -73,0 +73,0 @@ "selectn": "~1.1.2" |
232766
+ Addedlodash.isobjectlike@~4.0.0
+ Addedlodash.isobjectlike@4.0.0(transitive)
- Removedlodash.isplainobject@~4.0.6
- Removedlodash.isplainobject@4.0.6(transitive)