lib/normalizers/v1.js
function (requestV1) {
        if (!requestV1) { return; }

        var mode = requestV1.dataMode,
            noDefaults = this.options.noDefaults,
            retainEmptyValues = this.options.retainEmptyValues;

        if ((!mode || mode === 'binary') && !noDefaults) {
            return retainEmptyValues ? [] : undefined;
        }
        if (!requestV1.data) { return; }

        _.isArray(requestV1.data) && _.forEach(requestV1.data, function (datum) {
            if (datum.type === 'file' && (_.has(datum, 'value') || !noDefaults)) {
                datum.value = (_.isString(datum.value) || _.isArray(datum.value)) ? datum.value : null;
            }

            util.cleanEmptyValue(datum, 'description', retainEmptyValues);
        });

        return requestV1.data;
    }
function (requestV1) {
        if (!requestV1) { return; }

        var mode = requestV1.dataMode,
            noDefaults = this.options.noDefaults,
            retainEmptyValues = this.options.retainEmptyValues;

        if ((!mode || mode === 'binary') && !noDefaults) {
            return retainEmptyValues ? [] : undefined;
        }
        if (!requestV1.data) { return; }

        _.isArray(requestV1.data) && _.forEach(requestV1.data, function (datum) {
            if (datum.type === 'file' && (_.has(datum, 'value') || !noDefaults)) {
                datum.value = (_.isString(datum.value) || _.isArray(datum.value)) ? datum.value : null;
            }

            util.cleanEmptyValue(datum, 'description', retainEmptyValues);
        });

        return requestV1.data;
    }
function ( requestV1 ) { if ( ! requestV1 ) { return ; } var mode = requestV1 . dataMode , noDefaults = this . options . noDefaults , retainEmptyValues = this . options . retainEmptyValues ; if ( ( ! mode || mode === 'binary' ) && ! noDefaults ) { return retainEmptyValues ? [ ] : undefined ; } if ( ! requestV1 . data ) { return ; } _ . isArray ( requestV1 . data ) && _ . forEach ( requestV1 . data , function ( datum ) { if ( datum . type === 'file' && ( _ . has ( datum , 'value' ) || ! noDefaults ) ) { datum . value = ( _ . isString ( datum . value ) || _ . isArray ( datum . value ) ) ? datum . value : null ; } util . cleanEmptyValue ( datum , 'description' , retainEmptyValues ) ; } ) ; return requestV1 . data ; }
Sanitizes request v1 data.

@param {Object} requestV1 - The wrapper v1 request object around the data list to be sanitized.
@returns {Object[]} - The normalized list of request body parameters.
Sanitizes request v1 data .