lib/normalizers/v1.js
function (responseV1) {
        var self = this;

        // if noDefaults is true, do not replace the id
        // else
        // if id is falsy, replace the id
        // if retainIds is false, replace the id
        !((self.options.retainIds && responseV1.id) || self.options.noDefaults) && (responseV1.id = util.uid());

        // the true in the next line ensures that we don't recursively go on processing responses in a request.
        responseV1.request = self.request(responseV1.request, undefined, true);

        !responseV1.language && (responseV1.language = 'Text');
        !responseV1.previewType && (responseV1.previewType = 'html');

        _.isEmpty(responseV1.cookies) && (delete responseV1.cookies);

        return responseV1;
    }
function (responseV1) {
        var self = this;

        // if noDefaults is true, do not replace the id
        // else
        // if id is falsy, replace the id
        // if retainIds is false, replace the id
        !((self.options.retainIds && responseV1.id) || self.options.noDefaults) && (responseV1.id = util.uid());

        // the true in the next line ensures that we don't recursively go on processing responses in a request.
        responseV1.request = self.request(responseV1.request, undefined, true);

        !responseV1.language && (responseV1.language = 'Text');
        !responseV1.previewType && (responseV1.previewType = 'html');

        _.isEmpty(responseV1.cookies) && (delete responseV1.cookies);

        return responseV1;
    }
function ( responseV1 ) { var self = this ; // if noDefaults is true, do not replace the id // else // if id is falsy, replace the id // if retainIds is false, replace the id ! ( ( self . options . retainIds && responseV1 . id ) || self . options . noDefaults ) && ( responseV1 . id = util . uid ( ) ) ; // the true in the next line ensures that we don't recursively go on processing responses in a request. responseV1 . request = self . request ( responseV1 . request , undefined , true ) ; ! responseV1 . language && ( responseV1 . language = 'Text' ) ; ! responseV1 . previewType && ( responseV1 . previewType = 'html' ) ; _ . isEmpty ( responseV1 . cookies ) && ( delete responseV1 . cookies ) ; return responseV1 ; }
Normalizes a potentially raw v1 response object.

@param {Object} responseV1 - The potentially raw v1 response object.
@returns {Object} - The normalized v1 response object.
Normalizes a potentially raw v1 response object .