<commit_before>/** @preserve yerbajs - simple javascript data management
 *  @copyright 2014 <NAME> <<EMAIL>>
 *  @license MIT License <http://opensource.org/licenses/MIT>
 */

(function () {
	var useToISOString = Date.prototype.toISOString ? 'toISOString' : 'getTime';

	// obj must be an array of items
	function yerba( obj ) {
		this._init( obj );
	}

	// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
	function genUID() {
		return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace( /[xy]/g, function( c ) {
			var r = Math.random() * 16 | 0, v = c == 'x' ? r : ( r & 0x3 | 0x8 );
			return v.toString( 16 );
		});
	}

	function isFunction( func ) {
		return Object.prototype.toString.call( func ) === '[object Function]';
	}

	function isString( str ) {
		return typeof( str ) === 'string' || str instanceof String;
	}

	function isNumber( num ) {
		return !isNaN( parseFloat( num ) ) && isFinite( num );
	}

	yerba.prototype = {
		_init: function ( obj ) {
			obj = obj || [];

			this.lastUpdate = 0;

			this.length = 0;

			for ( var i = 0, l = obj.length; i < l; i++ )
				this.add( obj[ i ] );
		},

		// used internally
		_setLastUpdate: function () {
			// fallback to getTime if toISOString is not available
			this.lastUpdate = new Date()[ useToISOString ]();
		},

		// used internally<commit_msg>improved setLastUpdate<commit_after>/** @preserve yerbajs - simple javascript data management
 *  @copyright 2014 <NAME> <<EMAIL>>
 *  @license MIT License <http://opensource.org/licenses/MIT>
 */

(function () {
	var timeMethod = Date.prototype.toISOString ? 'toISOString' : 'getTime';

	// obj must be an array of items
	function yerba( obj ) {
		this._init( obj );
	}

	// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
	function genUID() {
		return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace( /[xy]/g, function( c ) {
			var r = Math.random() * 16 | 0, v = c == 'x' ? r : ( r & 0x3 | 0x8 );
			return v.toString( 16 );
		});
	}

	function isFunction( func ) {
		return Object.prototype.toString.call( func ) === '[object Function]';
	}

	function isString( str ) {
		return typeof( str ) === 'string' || str instanceof String;
	}

	function isNumber( num ) {
		return !isNaN( parseFloat( num ) ) && isFinite( num );
	}

	yerba.prototype = {
		_init: function ( obj ) {
			obj = obj || [];

			this.lastUpdate = 0;

			this.length = 0;

			for ( var i = 0, l = obj.length; i < l; i++ )
				this.add( obj[ i ] );
		},

		// used internally
		_setLastUpdate: function () {
			// fallback to getTime if toISOString is not available
			this.lastUpdate = new Date()[ timeMethod ]();
		},

		// used internally
{'fraction_non_alphanumeric': 0.16202155332590115, 'fraction_numerical': 0.017094017094017096, 'mean_word_length': 3.029940119760479, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '606713', 'n_tokens_mistral': 1066, 'n_tokens_neox': 914, 'n_words': 246}