<commit_before>(function () { // start
	
/*

Specs:

	URL
	
	theme.host
	actually protocol, host and port
	theme.rootPath
	relative to host
	theme.filePath
	relative to root
	theme.sitePath
	relative to root
	
	theme.open(href, target)
	Open URL with ajax or native js, target not required
	
	theme.update(title, body)
	Update body

*/


/* Template */

function Template(name, view) {
	
	/* test */
	
	var validName = validate(name, 'string'),
		noView = !view,
		validView = validate(view, ['function', 'object']);
	
	/* decide */
	
	if (validName) this.name = name;
	else throw 'Invalid view paramenter of Template, name must be a string.';
	
	if (noView) this.view = {};
	else if (validView) this.view = view;
	else throw 'Invalid view paramenter of Template, view has to be an object, a function or not defined.';
	
	/* tools */
	
	function validate(variable, type) {
		
		var typeOfVariable = typeOf(variable);
		
		if (type instanceof Array) {
			
			for (var i = type.length; i--;) if (typeOfVariable == type[i]) return true;
			return false;
			
		} else if (typeOf(type) == 'string') {
			
			if (typeOfVariable == type) return true;
			return false;
			
		}
		
	}
	<commit_msg>removed validation<commit_after>(function () { // start
	
/*

Specs:

	URL
	
	theme.host
	actually protocol, host and port
	theme.rootPath
	relative to host
	theme.filePath
	relative to root
	theme.sitePath
	relative to root
	
	theme.open(href, target)
	Open URL with ajax or native js, target not required
	
	theme.update(title, body)
	Update body

*/


/* Template */

function Template(name, view) {
	
	this.name = name;
	this.view = view || {};
	
{'fraction_non_alphanumeric': 0.11538461538461539, 'fraction_numerical': 0.0, 'mean_word_length': 3.138888888888889, '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': '4839376', 'n_tokens_mistral': 590, 'n_tokens_neox': 516, 'n_words': 177}