<commit_before>var fs    = require('fs'),
    url   = require('url'),
    merge = require('utils-merge');

exports = module.exports = function(options) {

	// Copy options object
	options = merge({
		'pubFilePath':  './public',
		'tmplDir':      'html',
		'tmplEngine':   require('larvittmpl'),
		'customRoutes': [],
		'debug':        false
	}, options);

	if (options.debug === true)
		options.tmplEngine.logTime = true;

	var returnObj = {};

	returnObj.resolve = function resolve(request, callback) {
		request.urlParsed = url.parse(request.url, true);
		var pathname      = request.urlParsed.pathname;

		// Remove .json path ending
		if (pathname.substring(pathname.length - 5) == '.json')
			pathname = pathname.substring(0, pathname.length - 5);

		var i = 0;
		while (options.customRoutes[i] !== undefined) {
			if (RegExp(options.customRoutes[i].regex).test(pathname)) {
				request.controllerName = options.customRoutes[i].controllerName;
				callCallback();
			}<commit_msg>Modified debug setting for larvittmpl<commit_after>var fs    = require('fs'),
    url   = require('url'),
    merge = require('utils-merge');

exports = module.exports = function(options) {

	// Copy options object
	options = merge({
		'pubFilePath':  './public',
		'tmplDir':      'html',
		'tmplEngine':   require('larvittmpl'),
		'customRoutes': [],
		'debug':        false
	}, options);

	if (options.debug === true)
		options.tmplEngine.debug = true;

	var returnObj = {};

	returnObj.resolve = function resolve(request, callback) {
		request.urlParsed = url.parse(request.url, true);
		var pathname      = request.urlParsed.pathname;

		// Remove .json path ending
		if (pathname.substring(pathname.length - 5) == '.json')
			pathname = pathname.substring(0, pathname.length - 5);

		var i = 0;
		while (options.customRoutes[i] !== undefined) {
			if (RegExp(options.customRoutes[i].regex).test(pathname)) {
				request.controllerName = options.customRoutes[i].controllerName;
				callCallback();
			}
{'fraction_non_alphanumeric': 0.1576305220883534, 'fraction_numerical': 0.004016064257028112, 'mean_word_length': 3.6456876456876457, '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': '2077763', 'n_tokens_mistral': 705, 'n_tokens_neox': 633, 'n_words': 134}