@polka-codes/core 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1010,6 +1010,14 @@ var getStringArray = (args, name, defaultValue) => {
|
|
|
1010
1010
|
if (ret === "") {
|
|
1011
1011
|
return [];
|
|
1012
1012
|
}
|
|
1013
|
+
if (Array.isArray(ret)) {
|
|
1014
|
+
for (const item of ret) {
|
|
1015
|
+
if (typeof item !== "string") {
|
|
1016
|
+
throw new Error(`Invalid argument type: ${name} ${item}`);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
return ret;
|
|
1020
|
+
}
|
|
1013
1021
|
if (typeof ret !== "string") {
|
|
1014
1022
|
throw new Error(`Invalid argument type: ${name} ${ret}`);
|
|
1015
1023
|
}
|