(value: unknown)
| 150 | } |
| 151 | |
| 152 | function valueToList(value: unknown): Array<string> { |
| 153 | if (Array.isArray(value)) { |
| 154 | return value |
| 155 | .map((item) => itemToString(item)) |
| 156 | .filter((item): item is string => Boolean(item)) |
| 157 | } |
| 158 | |
| 159 | const item = itemToString(value) |
| 160 | return item ? [item] : [] |
| 161 | } |
| 162 | |
| 163 | function dedupeLabels(labels: Array<string>): Array<string> { |
| 164 | const seen = new Set<string>() |
no test coverage detected