mrules-engine
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,4 +0,4 @@ | ||
declare function _pathOr(defaultValue: any, obj: Object, ...keys: any): any; | ||
declare const unflatten: any; | ||
declare const pathOr: any; | ||
declare const generatePath: (defaultValue: any, obj: Object, ...keys: any) => any; | ||
declare const pathOr: (defaultValue: any, paths: Array<string>, body: Object) => any; | ||
interface Rule { | ||
@@ -5,0 +5,0 @@ pathTo: string; |
@@ -1,8 +0,4 @@ | ||
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 generatePath = (defaultValue, obj, ...keys) => keys.reduce((acc, key) => (acc || {})[key], obj) || defaultValue; | ||
const pathOr = (defaultValue, paths, body) => generatePath(defaultValue, body, ...paths); | ||
; | ||
@@ -9,0 +5,0 @@ ; |
{ | ||
"name": "mrules-engine", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "flat": "^4.0.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40682
28