File size: 355 Bytes
20f83d9 | 1 2 3 4 5 6 7 8 9 10 | /**
* Defensive parser for repeated-string query params.
* Some codegen paths may pass comma-separated strings into string[] fields.
*/
export function parseStringArray(raw: unknown): string[] {
if (Array.isArray(raw)) return raw.filter(Boolean);
if (typeof raw === 'string' && raw.length > 0) return raw.split(',').filter(Boolean);
return [];
}
|