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

mrules-engine

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mrules-engine - npm Package Compare versions

Comparing version 1.0.8 to 1.1.0

dist/rules-engine.d.ts

10

dist/rules-engine.js

@@ -1,9 +0,13 @@

const { pathOr } = require('ramda');
function _pathOr(defaultValue, obj, ...keys) {
return keys.reduce((acc, key) => (acc || {})[key], obj) || defaultValue;
}
;
module.exports = (defaultValue, paths, body) => _pathOr(defaultValue, body, ...paths);
const { unflatten } = require('flat');
const pathOr = require('./path-or');
;
;
const extract = (_path, body) => pathOr(null, _path.split('.'), body);
const defaultSelector = (selected) => selected;
const execute = (body, acc, item) => {
const { pathTo, pathFor, fallback = null, selectorFn = defaultSelector, } = item;
const { pathTo, pathFor, fallback = null, selectorFn = (s) => s, } = item;
acc[pathFor] = selectorFn(extract(pathTo, body) || fallback);

@@ -10,0 +14,0 @@ return acc;

{
"name": "mrules-engine",
"version": "1.0.8",
"version": "1.1.0",
"dependencies": {
"flat": "^4.0.0",
"ramda": "^0.25.0"
"flat": "^4.0.0"
},

@@ -8,0 +7,0 @@ "main": "dist/rules-engine.js",

Sorry, the diff of this file is not supported yet

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