<commit_before>luga.namespace("luga.docs");

(function(){
	"use strict";

	var Controller = function(){

		var CONST = {
			SELECTORS: {
				CONTENT: "#content"
			},
			INCLUDES_PATH: "fragments/",
			INCLUDES_SUFFIX: ".inc",
			BASE_INCLUDE_ID: "index"
		};

		/**
		 * @type {luga.router.Router}
		 */
		var router = new luga.router.Router();

		var init = function(){

			initRouter();

			var currentHash = location.hash.substring(1);
			// If the hash is a valid route, load it
			if(router.getByPath(currentHash) !== undefined){
				loadInclude(currentHash);
			}
			else{
				loadInclude(CONST.BASE_INCLUDE_ID);
			}

		};

		var initRouter = function(){
			router.add("index", routeResolver);
			router.add("api", routeResolver);
			router.add("client-side", routeResolver);
			router.add("server-side", routeResolver);
			router.start();
		};<commit_msg>Docs: Simplified handling of default route<commit_after>luga.namespace("luga.docs");

(function(){
	"use strict";

	var Controller = function(){

		var CONST = {
			SELECTORS: {
				CONTENT: "#content"
			},
			INCLUDES_PATH: "fragments/",
			INCLUDES_SUFFIX: ".inc",
			DEFAULT_INCLUDE_ID: "index"
		};

		/**
		 * @type {luga.router.Router}
		 */
		var router = new luga.router.Router();

		var init = function(){
			initRouter();
			var routed = router.resolve(location.hash.substring(1));
			if(routed === false){
				// Current hash is not resolved, load default
				loadInclude(CONST.DEFAULT_INCLUDE_ID);
			}
		};

		var initRouter = function(){
			router.add("index", routeResolver);
			router.add("api", routeResolver);
			router.add("client-side", routeResolver);
			router.add("server-side", routeResolver);
			router.start();
		};
{'fraction_non_alphanumeric': 0.16178194607268465, 'fraction_numerical': 0.0011723329425556857, 'mean_word_length': 3.5278514588859418, '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': '6672171', 'n_tokens_mistral': 688, 'n_tokens_neox': 556, 'n_words': 115}