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

Function sortByGroupAndLabel

src/mapper/utils.ts:173–186  ·  view source on GitHub ↗
(
  a: { label: string; group: string },
  b: { label: string; group: string },
  unused: string
)

Source from the content-addressed store, hash-verified

171}
172
173function sortByGroupAndLabel(
174 a: { label: string; group: string },
175 b: { label: string; group: string },
176 unused: string
177) {
178 if (a.group === unused && b.group !== unused) {
179 return -1;
180 }
181 if (a.group !== unused && b.group === unused) {
182 return 1;
183 }
184
185 return a.label.localeCompare(b.label);
186}
187
188export function areAllRequiredMappingsSet(
189 sheetDefinitions: SheetDefinition[],

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected