import type { TLabelValues } from '@promster/types' ; function sortLabels ( unsortedLabels ) { return Object . keys ( unsortedLabels ) . sort ( ( a , b ) => { if ( a < b ) { return - 1 ; } if ( a > b ) { return 1 ; } return 0 ; } ) . reduce ( ( sortedLabels , labelName ) => { sortedLabels [ labelName ] = unsortedLabels [ labelName ] ; return sortedLabels ; } , { } ) ; } export { sortLabels } ;