"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sortObjectComparator = exports.getKeys = exports.pick = void 0;
function pick(object, keys) {
    const result = {};
    for (const key of keys) {
        if (Object.prototype.hasOwnProperty.call(object, key)) {
            result[key] = object[key];
        }
    }
    return result;
}
exports.pick = pick;
function getKeys(object, keys) {
    return Object.keys(object).filter(k => keys.includes(k));
}
exports.getKeys = getKeys;
function sortObjectComparator(key, order) {
    return (a, b) => {
        if (a[key] < b[key]) {
            return order === 'asc' ? -1 : 1;
        }
        if (a[key] > b[key]) {
            return order === 'asc' ? 1 : -1;
        }
        return 0;
    };
}
exports.sortObjectComparator = sortObjectComparator;
//# sourceMappingURL=object.js.map