js/modules/reqres/res.js
function reqres(res, req) {
    if (req && req._headers) {
        throw new Error('Received response object where request object was expected');
    }
    this.res = res;
    this.req = req;
    if (res) {
        if (res.$ && res.$.data) {
            this.data = res.$.data;
        }
        else {
            this.data = { error: null };
            if (!res.$) {
                res.$ = this;
            }
        }
    }
}
function reqres(res, req) {
    if (req && req._headers) {
        throw new Error('Received response object where request object was expected');
    }
    this.res = res;
    this.req = req;
    if (res) {
        if (res.$ && res.$.data) {
            this.data = res.$.data;
        }
        else {
            this.data = { error: null };
            if (!res.$) {
                res.$ = this;
            }
        }
    }
}
function reqres ( res , req ) { if ( req && req . _headers ) { throw new Error ( 'Received response object where request object was expected' ) ; } this . res = res ; this . req = req ; if ( res ) { if ( res . $ && res . $ . data ) { this . data = res . $ . data ; } else { this . data = { error : null } ; if ( ! res . $ ) { res . $ = this ; } } } }
inbound request response processor returns function that appends output that also has a tun of helper methods
inbound request response processor returns function that appends output that also has a tun of helper methods