All files / app/codeCharta/state/selectors/accumulatedData/metricData sortByMetricName.ts

100% Statements 6/6
75% Branches 3/4
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8139x 37x 62x 62x 62x      
export const sortByMetricName = (metricData: { name: string }[]) => {
    metricData.sort((a, b) => {
        const aLower = a.name.toLowerCase()
        const bLower = b.name.toLowerCase()
        return aLower > bLower ? 1 : bLower > aLower ? -1 : 0
    })
}