@intelligo.ai/object-to-schema
Advanced tools
Comparing version 2.1.8 to 2.1.9
@@ -7,3 +7,3 @@ declare function fromTracerDate(tracerDate: number): string | undefined; | ||
declare function companyAddressType(addressType: string): any; | ||
declare function fieldConditionMapping(value: any, options: any): string | number | undefined; | ||
declare function fieldConditionMapping(value: any, options: any): any; | ||
export declare const strategies: { | ||
@@ -10,0 +10,0 @@ predefinedTransformations: { |
@@ -103,3 +103,3 @@ "use strict"; | ||
function fieldConditionMapping(value, options) { | ||
var pathToCheck = options.pathToCheck, condition = options.condition, conditionValue = options.conditionValue, valueToMap = options.valueToMap; | ||
var pathToCheck = options.pathToCheck, condition = options.condition, conditionValue = options.conditionValue, valueToMap = options.valueToMap, pathToMap = options.pathToMap; | ||
var valueToCheck = object_path_1.get(value, pathToCheck); | ||
@@ -127,3 +127,7 @@ var pass; | ||
} | ||
return pass ? valueToMap : undefined; | ||
return pass ? | ||
pathToMap ? | ||
object_path_1.get(value, pathToMap) : | ||
valueToMap : | ||
undefined; | ||
} | ||
@@ -130,0 +134,0 @@ exports.strategies = { |
{ | ||
"name": "@intelligo.ai/object-to-schema", | ||
"version": "2.1.8", | ||
"version": "2.1.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
348180
6753