"use strict";
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.responseMessageToString = void 0;
var lodash_1 = require("lodash");
function responseMessageToString(message) {
    if (typeof message === 'object' && !(0, lodash_1.isNil)(message)) {
        return Object.entries(message).reduce(function (str, _a) {
            var _b = __read(_a, 2), key = _b[0], value = _b[1];
            return [str, "".concat(key, " ").concat(value)].filter(function (el) { return el; }).join(', ');
        }, '');
    }
    return message;
}
exports.responseMessageToString = responseMessageToString;
//# sourceMappingURL=responseMessageToString.js.map