"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setProp = setProp;
const deep_set_1 = require("./deep-set");
/**
 * Sets a deep object property, constructing the property path as necessary
 *
 * @param path - the path to the property we want to set
 * @param val - the value we want to set it to
 * @param obj - the target object
 * @param replace - if true, replace the value at the path with the new value instead of merging
 */
function setProp(path, val, obj, replace = false) {
    if (Array.isArray(path)) {
        path = path.join(".");
    }
    (0, deep_set_1.deepSet)(obj, path, val, replace);
}
//# sourceMappingURL=set-prop.js.map