( value: string, message: string, code: KimiErrorCode, )
| 596 | } |
| 597 | |
| 598 | function normalizeRequiredString( |
| 599 | value: string, |
| 600 | message: string, |
| 601 | code: KimiErrorCode, |
| 602 | ): string { |
| 603 | const normalized = value.trim(); |
| 604 | if (normalized.length === 0) { |
| 605 | throw new KimiError(code, message); |
| 606 | } |
| 607 | return normalized; |
| 608 | } |
| 609 | |
| 610 | function normalizeOptionalString(value: string | undefined): string | undefined { |
| 611 | if (value === undefined) return undefined; |
no outgoing calls
no test coverage detected