@contrail/types
Advanced tools
Comparing version 1.0.22 to 2.0.0
@@ -10,3 +10,4 @@ import { NumberFormatingOption, TypeProperty } from "../type-properties"; | ||
setLocalConfig(config: LocalizationConfig): void; | ||
getDisplayValue(obj: any, property: TypeProperty): string; | ||
getDisplayValue(obj: Object, property: TypeProperty): string; | ||
formatValueForProperty(value: any, property: TypeProperty): string; | ||
formatOptionValue(value: any, property: TypeProperty): string; | ||
@@ -13,0 +14,0 @@ formatValue(value: any, propertyType: any, numberFormat?: NumberFormatingOption): string; |
@@ -23,2 +23,8 @@ "use strict"; | ||
let value = obj[property.slug]; | ||
return this.formatValueForProperty(value, property); | ||
} | ||
formatValueForProperty(value, property) { | ||
if (!value || !property) { | ||
return ''; | ||
} | ||
if (property.options) { | ||
@@ -25,0 +31,0 @@ return this.formatOptionValue(value, property); |
{ | ||
"name": "@contrail/types", | ||
"version": "1.0.22", | ||
"version": "2.0.0", | ||
"description": "Types Utility module", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
27519
632