(value: string | undefined, field: string)
| 9 | } |
| 10 | |
| 11 | export function requireText(value: string | undefined, field: string): string { |
| 12 | const text = value?.trim(); |
| 13 | if (!text) { |
| 14 | throw new AppError('INVALID_ARGS', `${field} must be a non-empty string`); |
| 15 | } |
| 16 | return text; |
| 17 | } |
no outgoing calls
no test coverage detected