<commit_before>// Wee 2.0.5 (<EMAIL>)
// Licensed under Apache 2 (http://www.apache.org/licenses/LICENSE-2.0)
// DO NOT MODIFY THIS FILE

Wee.fn.make('screen', {
	// Get current screen value
	size: function() {
		var size = Wee._legacy ?
				(Wee._html.currentStyle ? Wee._html.currentStyle['fontFamily'] : null) :
				Wee._win.getComputedStyle(Wee._html, null).getPropertyValue('font-family');

		return parseFloat(size.replace(/[^0-9\.]+/g, ''), 10);
	},
	// Bind single or set of screen events with specified options
	map: function(sets) {
		sets = Wee.$toArray(sets);

		for (var i = 0; i < sets.length; i++) {
			var conf = sets[i],
				scope = this;

			if (conf.callback) {
				// Only bind resize event if not disabled
				if (conf.watch !== false) {
					this.$push('evts', conf);

					// Only create event if not already running
					if (! this.$get('on')) {
						this.$set('on', 1);
						this.$set('evts', [conf]);

						// Watch widow resize event for breakpoint changes
						var cb = function() {
							scope.$private('check');
						};

						Wee._legacy ?
							Wee._win.attachEvent('onresize', cb) :
							Wee._win.addEventListener('resize', cb);
					}
				}

				// Evaluate current screen if not disabled
				if (conf.init !== false) {
					this.$private('check', true, [conf]);
				}
			}
		}
	}
}, {
	check: function(init, conf) {
		var size = this.$public.size(),
			prev = this.$get('size');
			init = init || false;

		// If breakpoint has been hit or resize logic initialized
		if (size !== prev || init) {
			var evts = conf || this.$get('evts'),
				i = 0;

			for (; i < evts.length; i++) {
				var evt = evts[i],
					sz = evt.size,
					mn = evt.min,
					mx = evt.max;

				// Check match against settings
				if ((! sz && ! mn && ! mx) ||
					(sz && sz === size) ||
					(mn && size >= mn && (init || prev < mn) && (! mx || size <= mx)) ||
					(mx && size <= mx && (init || prev > mx) && (! mn || size >= mn))) {
					Wee.$exec(evt.callback, {
						args: [{
							dir: init ? 0 : (size > prev ? 1 : -1),
							size: size,
							prev: prev,
							init: init
						}].concat(evt.args),
						scope: evt.scope
					});
				}
			}

			// Set current screen value
			this.$set('size', size);
		}
	}
});<commit_msg>Update code to adhere to validation rules Add 1ms timeout to address IE bug Add new once property to only execute the rule and then remove it from the watch<commit_after>Wee.fn.make('screen', {
	// Get current screen value
	// Returns number
	size: function() {
		var size = Wee._legacy ?
				(Wee._html.currentStyle ? Wee._html.currentStyle.fontFamily : null) :
				Wee._win.getComputedStyle(Wee._html, null).getPropertyValue('font-family');

		return parseFloat(size.replace(/[^0-9\.]+/g, ''), 10);
	},
	// Bind single or set of screen events with specified options
	map: function(val) {
		var sets = Wee.$toArray(val),
			scope = this,
			cb = function() {
				scope.$private('check');
			};

		// Delay check 1ms to avoid incorrect size in IE
		setTimeout(function() {
			for (var i = 0; i < sets.length; i++) {
				var conf = sets[i];

				if (conf.callback) {
					// Only bind resize event if not disabled
					if (conf.watch !== false) {
						scope.$push('evts', conf);

						// Only create event if not already running
						if (! scope.$get('on')) {
							scope.$set('on', 1);
							scope.$set('evts', [conf]);

							// Watch widow resize event for breakpoint changes
							Wee._legacy ?
								Wee._win.attachEvent('onresize', cb) :
								Wee._win.addEventListener('resize', cb);
						}
					}

					// Evaluate current screen if not disabled
					if (conf.init !== false) {
						scope.$private('check', true, [conf]);
					}
				}
			}
		}, 1);
	}
}, {
	check: function(init, conf) {
		var size = this.$public.size(),
			prev = this.$get('size');
		init = init || false;

		// If breakpoint has been hit or resize logic initialized
		if (size !== prev || init) {
			var evts = conf || this.$get('evts'),
				i = 0;

			for (; i < evts.length; i++) {
				var evt = evts[i],
					sz = evt.size,
					mn = evt.min,
					mx = evt.max;

				// Check match against settings
				if ((! sz && ! mn && ! mx) ||
					(sz && sz === size) ||
					(mn && size >= mn && (init || prev < mn) && (! mx || size <= mx)) ||
					(mx && size <= mx && (init || prev > mx) && (! mn || size >= mn))) {
					Wee.$exec(evt.callback, {
						args: [{
							dir: init ? 0 : (size > prev ? 1 : -1),
							size: size,
							prev: prev,
							init: init
						}].concat(evt.args),
						scope: evt.scope
					});

					// Disable future execution if set for once
					if (evt.once === true) {
						this.$set('evts', this.$get('evts').filter(function(el) {
							return el !== evt;
						}));
					}
				}
			}

			// Set current screen value
			this.$set('size', size);
		}
	}
});
{'fraction_non_alphanumeric': 0.17890382626680454, 'fraction_numerical': 0.0059979317476732165, 'mean_word_length': 2.2697768762677484, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '5380789', 'n_tokens_mistral': 2119, 'n_tokens_neox': 1631, 'n_words': 461}