json-rules-engine
Advanced tools
Comparing version 5.2.0 to 5.3.0
@@ -0,1 +1,7 @@ | ||
#### 5.3.0 / 2020-12-02 | ||
* Allow facts to have a value of `undefined` | ||
#### 5.2.0 / 2020-11-31 | ||
* No changes; published to correct an accidental publish of untagged alpha | ||
#### 5.0.4 / 2020-09-26 | ||
@@ -2,0 +8,0 @@ * Upgrade dependencies to latest |
@@ -43,5 +43,2 @@ 'use strict'; | ||
if (!this.id) throw new Error('factId required'); | ||
if (typeof this.value === 'undefined' && typeof this.calculationMethod === 'undefined') { | ||
throw new Error('facts must have a value or method'); | ||
} | ||
@@ -48,0 +45,0 @@ this.priority = parseInt(options.priority || 1, 10); |
{ | ||
"name": "json-rules-engine", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"description": "Rules Engine expressed in simple json", | ||
@@ -14,3 +14,4 @@ "main": "dist/index.js", | ||
"build": "babel --stage 1 -d dist/ src/", | ||
"watch": "babel --watch --stage 1 -d dist/ src" | ||
"watch": "babel --watch --stage 1 -d dist/ src", | ||
"examples": "./test/support/example_runner.sh" | ||
}, | ||
@@ -29,3 +30,4 @@ "repository": { | ||
"ignore": [ | ||
"/dist" | ||
"/dist", | ||
"/examples/node_modules" | ||
], | ||
@@ -32,0 +34,0 @@ "globals": [ |
![json-rules-engine](http://i.imgur.com/MAzq7l2.png) | ||
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) | ||
@@ -36,4 +35,5 @@ [![Build Status](https://github.com/cachecontrol/json-rules-engine/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/cachecontrol/json-rules-engine/workflows/Node.js%20CI/badge.svg?branch=master) | ||
```js | ||
import { Engine } from 'json-rules-engine' | ||
const { Engine } = require('json-rules-engine') | ||
/** | ||
@@ -113,3 +113,3 @@ * Setup a new engine | ||
```js | ||
import { Engine } from 'json-rules-engine' | ||
const { Engine } = require('json-rules-engine') | ||
@@ -116,0 +116,0 @@ // example client for making asynchronous requests to an api, database, etc |
74367
1332