(value: string | number, paramName: string)
| 15 | * Delegates to validateMondayNumericId; throws on invalid input. |
| 16 | */ |
| 17 | export function sanitizeNumericId(value: string | number, paramName: string): string { |
| 18 | const result = validateMondayNumericId(value, paramName) |
| 19 | if (!result.isValid) { |
| 20 | throw new Error(result.error!) |
| 21 | } |
| 22 | return result.sanitized! |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Coerces a limit/page param to a safe integer within bounds. |
no test coverage detected