Function
formatZodIssues
(
issues: ReadonlyArray<{ path: readonly PropertyKey[]; message: string }>
)
Source from the content-addressed store, hash-verified
| 511 | } |
| 512 | |
| 513 | function formatZodIssues( |
| 514 | issues: ReadonlyArray<{ path: readonly PropertyKey[]; message: string }> |
| 515 | ): string { |
| 516 | return issues |
| 517 | .map((issue) => { |
| 518 | const issuePath = |
| 519 | issue.path.length > 0 ? issue.path.map((part) => String(part)).join(".") : "<root>"; |
| 520 | return `${issuePath}: ${issue.message}`; |
| 521 | }) |
| 522 | .join("; "); |
| 523 | } |
| 524 | |
| 525 | function isPlainObject(value: unknown): value is Record<string, unknown> { |
| 526 | if (!value || typeof value !== "object" || Array.isArray(value)) { |
Tested by
no test coverage detected