<commit_before>/*global Cosmoz */
if (typeof Cosmoz === 'undefined') {
	var Cosmoz = {};
}

(function () {

	"use strict";

	/**
	 * @polymerBehavior
	 */
	Cosmoz.TemplateHelperBehavior = {
		abs: Math.abs,
		/**
		 * Helper function to see if any of the arguments are true
		 * @return {Boolean} [description]
		 */
		anyTrue: function () {
			var argumentArray = Array.prototype.slice.call(arguments);
			return argumentArray.some(function (arg) {
				return !!arg;
			});
		},
		/**
		 * Concatenate all arguments to a string
		 */
		concat: function () {
			return Array.prototype.join.call(arguments, '');
		},
		/**
		 * Check if variable is undefined, null, empty Array list,
		 * empty String or 0 number (like length).
		 * @param  {Object}  obj variable
		 * @return {Boolean}  true if "empty", false otherwise
		 */
		isEmpty: function (obj) {
			if (obj === undefined || obj === null) {
				return true;
			}
			if (obj instanceof Array && obj.length === 0) {
				return true;
			}
			var objType = typeof obj;
			if (objType === 'string' && obj.length === 0) {
				return true;
			}
			if (objType === 'number' && obj === 0) {
				return true;
			}
			return false;
		},
		toFixed: function (number, fixval) {
			return number.toFixed(fixval);
		},
		ifElse: function (iftrue, result, elseresult) {
			return iftrue ? result : elseresult;
		}
	};
	
}());<commit_msg>Add inArray TemplateBehaviorHelper<commit_after>/*global Cosmoz */
if (typeof Cosmoz === 'undefined') {
	var Cosmoz = {};
}

(function () {

	"use strict";

	/**
	 * @polymerBehavior
	 */
	Cosmoz.TemplateHelperBehavior = {
		/**
		 * Math.abs
		 */
		abs: Math.abs,
		/**
		 * Helper function to see if any of the arguments are true
		 * @return {Boolean} [description]
		 */
		anyTrue: function () {
			var argumentArray = Array.prototype.slice.call(arguments);
			return argumentArray.some(function (arg) {
				return !!arg;
			});
		},
		/**
		 * Concatenate all arguments to a string
		 */
		concat: function () {
			return Array.prototype.join.call(arguments, '');
		},
		/**
		 * If iftrue is true, return result, otherwise return elseresult
		 */
		ifElse: function (iftrue, result, elseresult) {
			return iftrue ? result : elseresult;
		},
		/**
		 * Check if item exists in array
		 */
		inArray: function (item, array) {
			return array.indexOf(item) > -1;
		},
		/**
		 * Check if variable is undefined, null, empty Array list,
		 * empty String or 0 number (like length).
		 * @param  {Object}  obj variable
		 * @return {Boolean}  true if "empty", false otherwise
		 */
		isEmpty: function (obj) {
			if (obj === undefined || obj === null) {
				return true;
			}
			if (obj instanceof Array && obj.length === 0) {
				return true;
			}
			var objType = typeof obj;
			if (objType === 'string' && obj.length === 0) {
				return true;
			}
			if (objType === 'number' && obj === 0) {
				return true;
			}
			return false;
		},
		/**
		 * Helper for Number.toFixed(arg)
		 */
		toFixed: function (number, fixval) {
			return number.toFixed(fixval);
		}
	};
	
}());
{'fraction_non_alphanumeric': 0.15346858638743455, 'fraction_numerical': 0.0029450261780104713, 'mean_word_length': 2.750920245398773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6254026', 'n_tokens_mistral': 1178, 'n_tokens_neox': 957, 'n_words': 286}