(value: string)
| 52 | } |
| 53 | |
| 54 | const parseOlderThanDays = (value: string): number => { |
| 55 | if (!/^\d+$/.test(value)) { |
| 56 | throw new Error('--older-than must be a positive integer') |
| 57 | } |
| 58 | |
| 59 | const days = Number(value) |
| 60 | if (!Number.isSafeInteger(days) || days <= 0) { |
| 61 | throw new Error('--older-than must be a positive integer') |
| 62 | } |
| 63 | |
| 64 | return days |
| 65 | } |
| 66 | |
| 67 | const parseKinds = (value: string): number[] => { |
| 68 | const parts = value |
no outgoing calls
no test coverage detected