(value, context, errors)
| 97 | } |
| 98 | |
| 99 | function normalizeStringArray(value, context, errors) { |
| 100 | if (!Array.isArray(value)) { |
| 101 | errors.push(`${context} must be an array`); |
| 102 | return null; |
| 103 | } |
| 104 | |
| 105 | const normalized = []; |
| 106 | for (const item of value) { |
| 107 | if (typeof item !== "string") { |
| 108 | errors.push(`${context} items must be strings`); |
| 109 | continue; |
| 110 | } |
| 111 | normalized.push(item); |
| 112 | } |
| 113 | return normalized; |
| 114 | } |
| 115 | |
| 116 | function normalizeEnv(value, context, errors) { |
| 117 | if (!isPlainObject(value)) { |
no outgoing calls
no test coverage detected