<commit_before>var thaw = (function() {

	function createFutureDate(milliseconds) {
		var t = new Date();
		t.setTime(t.getTime() + milliseconds);
		return t;
	}

	var defaultSettings = {
			each: function() {},
			done: function() {}
		},
		thawing = false;

	/**
	 * thaw an array of items
	 * @param {Array} items
	 * @param {Object} [options]
	 * @param {Number} [burnTime]
	 */
	function thaw(items, options, burnTime) {
		burnTime = (burnTime !== undefined ? burnTime : 50);

		if (options !== undefined) {
			for(var key in defaultSettings) {
				if (defaultSettings.hasOwnProperty(key)) {
					if (!options.hasOwnProperty(key)) {
						options[key] = defaultSettings[key];
					}
				}
			}
		} else {
			options = {};
		}

		var i = 0,
			each = (options.each !== undefined ? options.each : null),
			done = (options.done !== undefined ? options.done : null),
			tick = function() {
				if(i<0) return;

				setTimeout(tick, 0);

				if (!thawing) {
					if ((new Date()) < createFutureDate(burnTime)) {
						if (i>=items.length) {

							if (done !== null) {
								thawing = true;
								done.call(items[i]);
								thawing = false;
							}

							return;
						}

						if (each !== null) {
							thawing = true;
							each.call(items[i], i);
							thawing = false;
						}
						i++;
					}
				}
			};

		tick();
	}

	/**
	 * thaw a single item
	 * @param {Object} item
	 * @param {Object} [options]
	 * @param {Number} [burnTime]
	 */
	thaw.it = function(item, options, burnTime) {
		thaw([item], options, burnTime)
	};

	/**<commit_msg>If each isn't defined, item is a function<commit_after>var thaw = (function() {

	function createFutureDate(milliseconds) {
		var t = new Date();
		t.setTime(t.getTime() + milliseconds);
		return t;
	}

	var defaultSettings = {
			each: function() {},
			done: function() {}
		},
		thawing = false;

	/**
	 * thaw an array of items
	 * @param {Array} items
	 * @param {Object} [options]
	 * @param {Number} [burnTime]
	 */
	function thaw(items, options, burnTime) {
		burnTime = (burnTime !== undefined ? burnTime : 50);

		if (options !== undefined) {
			for(var key in defaultSettings) {
				if (defaultSettings.hasOwnProperty(key)) {
					if (!options.hasOwnProperty(key)) {
						options[key] = defaultSettings[key];
					}
				}
			}
		} else {
			options = {};
		}

		var i = 0,
			each = (options.each !== undefined ? options.each : null),
			done = (options.done !== undefined ? options.done : null),
			tick = function() {
				if(i<0) return;

				setTimeout(tick, 0);

				if (!thawing) {
					if ((new Date()) < createFutureDate(burnTime)) {
						if (i>=items.length) {

							if (done !== null) {
								thawing = true;
								done.call(items[i]);
								thawing = false;
							}

							return;
						}

						if (each !== null) {
							thawing = true;
							each.call(items[i], i);
							thawing = false;
						} else {
							items[i]();
						}
						i++;
					}
				}
			};

		tick();
	}

	/**
	 * thaw a single item
	 * @param {Object} item
	 * @param {Object} [options]
	 * @param {Number} [burnTime]
	 */
	thaw.it = function(item, options, burnTime) {
		thaw([item], options, burnTime)
	};

	/**
{'fraction_non_alphanumeric': 0.16603892027620842, 'fraction_numerical': 0.003138731952291274, 'mean_word_length': 2.379639448568399, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '2569742', 'n_tokens_mistral': 1442, 'n_tokens_neox': 1081, 'n_words': 261}