"use strict";
/*
 * Copyright (c) 2022.
 * Author Peter Placzek (tada5hi)
 * For the full copyright and license information,
 * view the LICENSE file that was distributed with this source code.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseSortValue = void 0;
const type_1 = require("./type");
function parseSortValue(value) {
    let direction = type_1.SortDirection.ASC;
    if (value.substring(0, 1) === '-') {
        direction = type_1.SortDirection.DESC;
        value = value.substring(1);
    }
    return {
        direction,
        value,
    };
}
exports.parseSortValue = parseSortValue;
//# sourceMappingURL=utils.js.map