"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getResponseTransform = getResponseTransform;
// 第三方依赖
const isFunction_1 = __importDefault(require("lodash/isFunction"));
const constants_1 = require("../../constants");
/**
 * 获取响应转换函数
 */
function getResponseTransform(remote) {
    if ((0, isFunction_1.default)(remote === null || remote === void 0 ? void 0 : remote.responseTransform)) {
        return remote.responseTransform;
    }
    if ((0, isFunction_1.default)(constants_1.globalConfig.responseTransform)) {
        return constants_1.globalConfig.responseTransform;
    }
    return constants_1.globalConfig.responseTransform;
}
