MCPcopy Create free account
hub / github.com/HelloCSV/HelloCSV / getLabelDictValue

Function getLabelDictValue

src/utils/index.ts:147–160  ·  view source on GitHub ↗
(
  labelDict: Record<string, ImporterOutputFieldType>,
  value: ImporterOutputFieldType
)

Source from the content-addressed store, hash-verified

145}
146
147export function getLabelDictValue(
148 labelDict: Record<string, ImporterOutputFieldType>,
149 value: ImporterOutputFieldType
150): ImporterOutputFieldType {
151 if (Array.isArray(value)) {
152 return value.map((v) => labelDict[v] ?? v).join(', ');
153 }
154
155 if (typeof value !== 'string') {
156 return value;
157 }
158
159 return labelDict[value] ?? value;
160}
161
162export function getColumnDisplayValue(
163 sheetDefinition: SheetDefinition,

Callers 2

SheetDataEditorCellFunction · 0.90
getColumnDisplayValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected