@contrail/types
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -12,3 +12,3 @@ "use strict"; | ||
static substituteValues(formula, data) { | ||
const regEx = /(?<=\{)(.*?)(?=\})/g; | ||
const regEx = /\{.*?\}/g; | ||
let result = formula; | ||
@@ -18,3 +18,4 @@ let vars = formula.match(regEx) || []; | ||
while (result.indexOf(name) > -1) { | ||
result = result.replace(`{${name}}`, data[name]); | ||
let key = name.slice(1, name.length - 1); | ||
result = result.replace(`${name}`, data[key]); | ||
} | ||
@@ -21,0 +22,0 @@ } |
{ | ||
"name": "@contrail/types", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"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
27264
40
625