(raw: string | undefined | null)
| 45 | * instead of being silently truncated to 123. |
| 46 | */ |
| 47 | export function parseGithubIdList(raw: string | undefined | null): Set<number> { |
| 48 | if (!raw) return new Set(); |
| 49 | const ids = new Set<number>(); |
| 50 | for (const part of raw.split(",")) { |
| 51 | const trimmed = part.trim(); |
| 52 | if (!/^\d+$/.test(trimmed)) continue; |
| 53 | const n = Number(trimmed); |
| 54 | if (n > 0) ids.add(n); |
| 55 | } |
| 56 | return ids; |
| 57 | } |
no test coverage detected