@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.
Files changed (2) hide show
  1. package/dist/index.js +8 -0
  2. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/core",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",