<commit_before>var marked = require('marked');

function TemplateParam(page, param) {
	this.page = page;
	this.site = page.site;
	this.root = page.site.root;
	for (var key in param) {
		if (key != 'page' && !this[key] && param.hasOwnProperty(key)) {
			this[key] = param[key];
		}
	}
}

TemplateParam.prototype.isActive = function(page) {
	return page == this._activePage;
};

TemplateParam.prototype.markdown = function(string) {
	return string ? marked(string) : '';
};

TemplateParam.prototype.render = function(template, page, param) {
	for (var key in param)
		this[key] = param[key];
	return (page || this.page)._renderTemplate(template, this);
};

TemplateParam.prototype.paginate = function(collection, perPage) {
	return collection.paginate(this.number, perPage);
};

module.exports = TemplateParam;<commit_msg>Cleanup TemplateParam.<commit_after>var marked = require('marked');

function TemplateParam(page, param) {
	this.page = page;
	this.site = page.site;
	this.root = page.site.root;
	for (var key in param) {
		if (key != 'page' && !this[key] && param.hasOwnProperty(key)) {
			this[key] = param[key];
		}
	}
}

TemplateParam.prototype = {
	isActive: function(page) {
		return page == this._activePage;
	},

	markdown: function(string) {
		return string ? marked(string) : '';
	},

	render: function(template, page, param) {
		for (var key in param)
			this[key] = param[key];
		return (page || this.page)._renderTemplate(template, this);
	},

	paginate: function(collection, perPage) {
		return collection.paginate(this.number, perPage);
	}
};

module.exports = TemplateParam;
{'fraction_non_alphanumeric': 0.15756434400502198, 'fraction_numerical': 0.0, 'mean_word_length': 4.692857142857143, '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': '73116', 'n_tokens_mistral': 551, 'n_tokens_neox': 528, 'n_words': 115}