packages/ove-lib-utils/src/persistence.js
function (item) {
        item.value.sort(function (a, b) {
            if (a.key < b.key) {
                return -1;
            }
            /* istanbul ignore next */
            // Below line exists only for the sake of completeness. Generally the array will
            // always be sorted, and therefore it is impossible to get to this state in a test.
            return a.key > b.key ? 1 : 0;
        });
        return item;
    }
function (item) {
        item.value.sort(function (a, b) {
            if (a.key < b.key) {
                return -1;
            }
            /* istanbul ignore next */
            // Below line exists only for the sake of completeness. Generally the array will
            // always be sorted, and therefore it is impossible to get to this state in a test.
            return a.key > b.key ? 1 : 0;
        });
        return item;
    }
function ( item ) { item . value . sort ( function ( a , b ) { if ( a . key < b . key ) { return - 1 ; } /* istanbul ignore next */ // Below line exists only for the sake of completeness. Generally the array will // always be sorted, and therefore it is impossible to get to this state in a test. return a . key > b . key ? 1 : 0 ; } ) ; return item ; }
A utility method to sort values of a persistable object or array, which is used when comparing current values with future values.
A utility method to sort values of a persistable object or array which is used when comparing current values with future values .