
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
simple-rules-engine
Advanced tools
A rules engine with a small API and simple rules configuration.
Please take a look at the examples folder for a complete simple use of this code.
npm install simple-rules-engine
Rules are JSON objects and can be a single object or an array of them.
The expected format is simple by design. Each rule object needs three fields:
field: author.nametrue. It's important to note that the outcome only runs when the validation returns a true value. This behavior is just the initial step.Ex.
const rule = {
field: 'name',
validation: function (value) {
return value === 'John Snow';
},
outcome: function (obj) {
obj.is_awesome = true;
return obj;
}
};
The engine will just return the target object that was passed in. As mentioned above this might change soon. Any feedback on this would be welcomed as a Github Issue using the feedback template.
FAQs
A rules engine with a small API and simple rules configuration
We found that simple-rules-engine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.