lib/normalizers/v1.js
function (request, options, callback) {
        var err,
            normalized,
            builders = new Builders(options);

        // At this stage, mutate will not be passed ordinarily. Hence, the falsy nature of options.mutate can be used
        // to selectively clone the request.
        options && !options.mutate && (request = _.cloneDeep(request));

        try { normalized = builders.request(request); }
        catch (e) { err = e; }

        if (callback) { return callback(err, normalized); }

        if (err) { throw err; }

        return normalized;
    }
function (request, options, callback) {
        var err,
            normalized,
            builders = new Builders(options);

        // At this stage, mutate will not be passed ordinarily. Hence, the falsy nature of options.mutate can be used
        // to selectively clone the request.
        options && !options.mutate && (request = _.cloneDeep(request));

        try { normalized = builders.request(request); }
        catch (e) { err = e; }

        if (callback) { return callback(err, normalized); }

        if (err) { throw err; }

        return normalized;
    }
function ( request , options , callback ) { var err , normalized , builders = new Builders ( options ) ; // At this stage, mutate will not be passed ordinarily. Hence, the falsy nature of options.mutate can be used // to selectively clone the request. options && ! options . mutate && ( request = _ . cloneDeep ( request ) ) ; try { normalized = builders . request ( request ) ; } catch ( e ) { err = e ; } if ( callback ) { return callback ( err , normalized ) ; } if ( err ) { throw err ; } return normalized ; }
Normalizes a single v1 request.

@param {Object} request - The v1 request to be normalized.
@param {Object} options - The set of options for the current normalization.
@param {?Boolean} [options.mutate=false] - When set to true, normalization is done in place.
@param {?Boolean} [options.noDefaults=false] - When set to true, sensible defaults are not added.
@param {?Boolean} [options.prioritizeV2=false] - When set to true, v2 style properties are checked first.
@param {?Boolean} [options.retainEmptyValues=false] - When set to true, empty values are set to '' instead of
being removed.
@param {Function} callback - A function that is invoked when the normalization has completed.
@returns {*}
Normalizes a single v1 request .