(field: DbField, value: string)
| 31 | } |
| 32 | |
| 33 | export function optionLabel(field: DbField, value: string): string { |
| 34 | const opt = field.options?.find((o) => o.value === value) |
| 35 | return opt?.label ?? opt?.value ?? value |
| 36 | } |
| 37 | |
| 38 | export function fieldsById(doc: DatabaseDoc): Map<string, DbField> { |
| 39 | return new Map(doc.fields.map((f) => [f.id, f])) |
no outgoing calls
no test coverage detected