lib/normalizers/index.js
function (collection, options, callback) {
        var version;

        if (!options || !(version = semver.valid(options.normalizeVersion, true)) || !normalizers[version]) {
            return callback(new Error('Version not specified or invalid: ' + options.normalizeVersion));
        }

        return normalizers[version].normalize(collection, options, callback);
    }
function (collection, options, callback) {
        var version;

        if (!options || !(version = semver.valid(options.normalizeVersion, true)) || !normalizers[version]) {
            return callback(new Error('Version not specified or invalid: ' + options.normalizeVersion));
        }

        return normalizers[version].normalize(collection, options, callback);
    }
function ( collection , options , callback ) { var version ; if ( ! options || ! ( version = semver . valid ( options . normalizeVersion , true ) ) || ! normalizers [ version ] ) { return callback ( new Error ( 'Version not specified or invalid: ' + options . normalizeVersion ) ) ; } return normalizers [ version ] . normalize ( collection , options , callback ) ; }
Accepts the arguments for normalization and invokes the appropriate normalizer with them.

@param {Object} collection - The plain collection JSON to be normalized.
@param {Object} options - A set of options for the current normalization.
@param {String} options.normalizeVersion - The base collection schema version for which to normalize.
@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 invoked to indicate the completion of the normalization process.
@returns {*}
Accepts the arguments for normalization and invokes the appropriate normalizer with them .