@contrail/types
Advanced tools
Comparing version 2.0.22 to 2.0.23
import { TypeProperty } from "../type-properties"; | ||
export declare class FormulaProcessor { | ||
static processFormula(formula: string | undefined, data: any): number; | ||
static processFormula(formula: string | undefined, data: any): number | null; | ||
static substituteValues(formula: string, data: any): string; | ||
@@ -5,0 +5,0 @@ static processFormulasForEntities(entities: Array<any>, properties: Array<TypeProperty>): void; |
@@ -8,3 +8,6 @@ "use strict"; | ||
const converted = this.substituteValues(formula, data); | ||
const value = parseFloat(eval(converted)); | ||
let value = parseFloat(eval(converted)); | ||
if (isNaN(value)) { | ||
return null; | ||
} | ||
return value; | ||
@@ -11,0 +14,0 @@ } |
{ | ||
"name": "@contrail/types", | ||
"version": "2.0.22", | ||
"version": "2.0.23", | ||
"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
21640
499