@contrail/types
Advanced tools
| 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 @@ } |
+1
-1
| { | ||
| "name": "@contrail/types", | ||
| "version": "2.0.22", | ||
| "version": "2.0.23", | ||
| "description": "Types Utility module", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
21640
0.33%499
0.6%