New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-rules-engine

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-rules-engine - npm Package Compare versions

Comparing version 5.0.0-alpha3 to 5.0.0

4

CHANGELOG.md

@@ -1,4 +0,4 @@

#### 5.0.0 / 2019-10-27
#### 5.0.0 / 2019-11-29
* BREAKING CHANGES
* Rule conditions' `path` property is now interpretted using [json-path](https://goessner.net/articles/JsonPath/)
* Rule conditions' `path` property is now interpreted using [json-path](https://goessner.net/articles/JsonPath/)
* To continue using the old syntax (provided via [selectn](https://github.com/wilmoore/selectn.js)), `npm install selectn` as a direct dependency, and `json-rules-engine` will continue to interpret legacy paths this way.

@@ -5,0 +5,0 @@ * Any path starting with `$` will be assumed to use `json-path` syntax

@@ -159,3 +159,10 @@ 'use strict';

return factValuePromise.then(function (factValue) {
return (0, _jsonpathPlus.JSONPath)({ path: path, json: factValue });
if ((0, _lodash2.default)(factValue)) {
var pathValue = (0, _jsonpathPlus.JSONPath)({ path: path, json: factValue, wrap: false });
(0, _debug2.default)('condition::evaluate extracting object property ' + path + ', received: ' + pathValue);
return pathValue;
} else {
(0, _debug2.default)('condition::evaluate could not compute object path(' + path + ') of non-object: ' + factValue + ' <' + (typeof factValue === 'undefined' ? 'undefined' : _typeof(factValue)) + '>; continuing with ' + factValue);
return factValue;
}
});

@@ -162,0 +169,0 @@ } else {

{
"name": "json-rules-engine",
"version": "5.0.0-alpha3",
"version": "5.0.0",
"description": "Rules Engine expressed in simple json",

@@ -64,3 +64,2 @@ "main": "dist/index.js",

"perfy": "^1.1.5",
"selectn": "^1.1.2",
"sinon": "^7.5.0",

@@ -67,0 +66,0 @@ "sinon-chai": "^3.3.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc