<commit_before>/*
* Given a fully normalized expects object from both the global
* and the local method, return the final expects object to be used
* in the validation.
*/
var _ 							 = require('lodash');
var normalizeExpects = require('../normalizeExpects');


module.exports = function (config) {

	var globalExpects = normalizeExpects(this._globalOptions.expects || {});
	var localExpects  = normalizeExpects(config.expects || {});

	// If globals disabled, only pass back local expects in an array of one
	if (config.globals === false) {
		return [ localExpects ];
	}

	// If both global and local expects are not functions, merge the two
	// objects and pass back an array of one.
	else if (!_.isFunction(globalExpects) && !_.isFunction(localExpects)) {
		return [ _.defaults(localExpects, globalExpects) ];
	}<commit_msg>test commit<commit_after>/*
* Given a fully normalized expects object from both the global
* and the local method, return the final expects object to be used
* in the validation.
*/
var _ 							 = require('lodash');
var normalizeExpects = require('../normalizeExpects');


module.exports = function (config) {

	var globalExpects = normalizeExpects(this._globalOptions.expects || {});
	var localExpects  = normalizeExpects(config.expects || {});

	// If globals disabled, only pass back local expects in an array of one
	if (config.globals === false || config.globals.expects === false) {
		return [ localExpects ];
	}

	// If both global and local expects are not functions, merge the two
	// objects and pass back an array of one.
	else if (!_.isFunction(globalExpects) && !_.isFunction(localExpects)) {
		return [ _.defaults(localExpects, globalExpects) ];
	}
{'fraction_non_alphanumeric': 0.11288416075650118, 'fraction_numerical': 0.0, 'mean_word_length': 4.161585365853658, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4919103', 'n_tokens_mistral': 508, 'n_tokens_neox': 476, 'n_words': 173}