@umbraco-cms/backoffice
    Preparing search index...

    Function umbVariantObjectSortCompare

    • Compares two variant objects by culture, then by segment, in the order the Management API returns variant collections in (invariant first, then ordinal and case-sensitive). This is not the display order of sortVariants, which prioritizes default language, mandatory state and publish state.

      Parameters

      • a: UmbSortableVariantObject

        The first object to compare.

      • b: UmbSortableVariantObject

        The second object to compare.

      Returns number

      A negative number if a sorts before b, positive if after, zero if equal.