@contrail/util
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -5,2 +5,3 @@ export declare class StringUtil { | ||
static isString(value: any): boolean; | ||
static isArray(value: any): boolean; | ||
} |
@@ -30,2 +30,12 @@ "use strict"; | ||
} | ||
if (StringUtil.isArray(replacementValue)) { | ||
if (quoteStrings) { | ||
const newArray = []; | ||
for (const val of replacementValue) { | ||
newArray.push(JSON.stringify(val)); | ||
} | ||
replacementValue = newArray; | ||
} | ||
replacementValue = '[' + replacementValue + ']'; | ||
} | ||
currentVariableString = currentVariableString.replace(match[0], replacementValue); | ||
@@ -38,3 +48,6 @@ } | ||
} | ||
static isArray(value) { | ||
return Array.isArray(value); | ||
} | ||
} | ||
exports.StringUtil = StringUtil; |
{ | ||
"name": "@contrail/util", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "General javascript utilities", | ||
@@ -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
15872
443