(value)
| 57 | } |
| 58 | |
| 59 | function asStringArray(value) { |
| 60 | if (Array.isArray(value)) { |
| 61 | return value |
| 62 | .map((item) => (typeof item === "string" ? item.trim() : undefined)) |
| 63 | .filter(Boolean); |
| 64 | } |
| 65 | if (typeof value === "string") { |
| 66 | return value.split(",").map((item) => item.trim()).filter(Boolean); |
| 67 | } |
| 68 | return []; |
| 69 | } |
| 70 | |
| 71 | function asBoolean(value) { |
| 72 | if (typeof value === "boolean") return value; |
no outgoing calls
no test coverage detected