"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sortDecProp = exports.sortAscProp = exports.sortTimestampAsc = exports.sortHashAsc = exports.sort_id_Asc = exports.sort_i_Asc = exports.sortDec = exports.sortAsc = void 0;
const sortAsc = (a, b) => {
    return a === b ? 0 : a < b ? -1 : 1;
};
exports.sortAsc = sortAsc;
const sortDec = (a, b) => {
    return a === b ? 0 : a > b ? -1 : 1;
};
exports.sortDec = sortDec;
const sort_i_Asc = (a, b) => {
    return a.i === b.i ? 0 : a.i < b.i ? -1 : 1;
};
exports.sort_i_Asc = sort_i_Asc;
const sort_id_Asc = (a, b) => {
    return a.id === b.id ? 0 : a.id < b.id ? -1 : 1;
};
exports.sort_id_Asc = sort_id_Asc;
const sortHashAsc = (a, b) => {
    return a.hash === b.hash ? 0 : a.hash < b.hash ? -1 : 1;
};
exports.sortHashAsc = sortHashAsc;
const sortTimestampAsc = (a, b) => {
    return a.timestamp === b.timestamp ? 0 : a.timestamp < b.timestamp ? -1 : 1;
};
exports.sortTimestampAsc = sortTimestampAsc;
const sortAscProp = (a, b, propName) => {
    // eslint-disable-next-line security/detect-object-injection
    const aVal = a[propName];
    // eslint-disable-next-line security/detect-object-injection
    const bVal = b[propName];
    return aVal === bVal ? 0 : aVal < bVal ? -1 : 1;
};
exports.sortAscProp = sortAscProp;
const sortDecProp = (a, b, propName) => {
    // eslint-disable-next-line security/detect-object-injection
    const aVal = a[propName];
    // eslint-disable-next-line security/detect-object-injection
    const bVal = b[propName];
    return aVal === bVal ? 0 : aVal > bVal ? -1 : 1;
};
exports.sortDecProp = sortDecProp;
//# sourceMappingURL=sortingCompareFunctions.js.map