* Build a lowercased Set from allowedFields. * Returns null when no restriction applies (empty list, non-array, or wildcard "*"). * @param {string[]} allowedFields * @returns {Set |null}
(allowedFields)
| 21 | * @returns {Set<string>|null} |
| 22 | */ |
| 23 | function buildAllowedFieldSet(allowedFields) { |
| 24 | if (!Array.isArray(allowedFields) || allowedFields.length === 0 || allowedFields.includes("*")) return null; |
| 25 | return new Set(allowedFields.map(f => f.toLowerCase())); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Validate one issue field name against configured allowed-fields. |
no outgoing calls
no test coverage detected