import { flatten, unflatten } from 'flat';
import _ from 'lodash';
export function flattenObjectSafe(obj, delimiter = '.') {
    return flatten(obj, { delimiter, safe: true });
}
export function flattenObject(obj, delimiter = '.') {
    return flatten(obj, { delimiter });
}
export function unflattenObject(obj, delimiter = '.') {
    return unflatten(obj, { delimiter });
}
export function unsetAll(obj, props) {
    props.forEach(path => {
        _.unset(obj, path);
    });
    return obj;
}
export function omitNested(obj, props) {
    const out = _.cloneDeep(obj);
    unsetAll(out, props);
    return out;
}
//# sourceMappingURL=object.js.map