(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var getValueObject = function (data, path, defaultValue) {
        var value = path
            .split(".")
            .reduce(function (dataValue, key) { return dataValue === null || dataValue === void 0 ? void 0 : dataValue[key]; }, data);
        return value !== undefined || value !== null ? value : defaultValue;
    };
    exports.default = getValueObject;
});
