<commit_before>(function (global) {
	
	var ncTools = global.ncTools || {};
	
	/**
	 * Execute a function immediately or after a delay
	 * @param {function} func - The function to execute
	 * @param {Number} [number] - The ms to wait
	 * @param {arguments} [args] - Arguments to pass as parameters
	*/
	ncTools.execute = function (func, delay, args) {
		
		if (typeof(delay) === "number") {
			global.setTimeout(func, delay);
		} else {
			func.apply(func, args);
		}
	};
	
	/**
	 * From the book "Pro Javascript Design Patterns" (page 44)
	 * http://bheinrichs.nl/Files/design%20patterns/APress_ProJavaScriptDesignPatterns.pdf
	 *
	 * To use:
	 * function Person (...)  {...}
	 * function Adam (...)  {...}
	 * ncTools.inherit(Person, Adam);
	 * OR (to not separate constructor code from inherit statement):
	 * var Adam = ncTools.inherit(
	 * 		Person,
	 * 		function() {
	 *			...Adam constructor code...
	 *		}
	 * );
	 *
	 */
	ncTools.inherit = function (SuperClass, SubClass) {

		// Create intermediate Class with empty constructor
		// which copies SuperClass prototype
		var F = function () {};

		F.prototype = SuperClass.prototype;

		// Now we can make an instance of the prototype
		// without knowing anything about SuperClass parameters
		SubClass.prototype = new F();

		// "Fix" the SubClass constructor property to
		// point on SubClass instead of SuperClass
		SubClass.prototype.constructor = SubClass;

		// Create "base" property to access SuperClass
		// functionality from SubClass.
		// For example in SubClass constructor:
		// function SubClass (name) {
		//            SubClass.base.constructor.call(this, name);
		// }
		SubClass.base = SuperClass.prototype;

		// "Fix" the constructor property for SuperClass too,
		// even if the SuperClass is the Object Class itself
		if (SuperClass.prototype.constructor === Object.prototype.constructor) {

			SuperClass.prototype.constructor = SuperClass;

		}

		return SubClass;

	};
	
	
	window.ncTools = ncTools;
	
}(window));<commit_msg>fix typo error<commit_after>(function (global) {
	
	var ncTools = global.ncTools || {};
	
	/**
	 * Execute a function immediately or after a delay
	 * @param {function} func - The function to execute
	 * @param {Number} [number] - The ms to wait
	 * @param {arguments} [args] - Arguments to pass as parameters
	*/
	ncTools.execute = function (func, delay, args) {
		
		if (typeof(delay) === "number") {
			global.setTimeout(func, delay);
		} else {
			func.apply(func, args);
		}
	};
	
	/**
	 * From the book "Pro Javascript Design Patterns" (page 44)
	 * http://bheinrichs.nl/Files/design%20patterns/APress_ProJavaScriptDesignPatterns.pdf
	 *
	 * To use:
	 * function Person (...)  {...}
	 * function Adam (...)  {...}
	 * ncTools.inherit(Person, Adam);
	 * OR (to not separate constructor code from inherit statement):
	 * var Adam = ncTools.inherit(
	 * 		Person,
	 * 		function() {
	 *			...Adam constructor code...
	 *		}
	 * );
	 *
	 */
	ncTools.inherit = function (SuperClass, SubClass) {

		// Create intermediate Class with empty constructor
		// which copies SuperClass prototype
		var F = function () {};

		F.prototype = SuperClass.prototype;

		// Now we can make an instance of the prototype
		// without knowing anything about SuperClass parameters
		SubClass.prototype = new F();

		// "Fix" the SubClass constructor property to
		// point on SubClass instead of SuperClass
		SubClass.prototype.constructor = SubClass;

		// Create "base" property to access SuperClass
		// functionality from SubClass.
		// For example in SubClass constructor:
		// function SubClass (name) {
		//            SubClass.base.constructor.call(this, name);
		// }
		SubClass.base = SuperClass.prototype;

		// "Fix" the constructor property for SuperClass too,
		// even if the SuperClass is the Object Class itself
		if (SuperClass.prototype.constructor === Object.prototype.constructor) {

			SuperClass.prototype.constructor = SuperClass;

		}

		return SubClass;

	};
	
	
	global.ncTools = ncTools;
	
}(window));
{'fraction_non_alphanumeric': 0.12527964205816555, 'fraction_numerical': 0.0019885657469550086, 'mean_word_length': 3.0523665659617323, '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': '3695187', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1149, 'n_words': 363}