"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deepDefault_ = deepDefault_;
function deepDefault_(obj, path, value) {
    if (path.length > 1) {
        const [head, ...tail] = path;
        obj[head] = obj[head] ?? {};
        deepDefault_(obj[head], tail, value);
    }
    else {
        const [head] = path;
        if (obj[head] === undefined) {
            obj[head] = value;
        }
    }
}
//# sourceMappingURL=deepDefault.js.map