<commit_before>import ExecutionEnvironment from './ExecutionEnvironment';

const HOOK = {};
const reDash = /\-./g;

const unitlessProperties = {
	'box-flex': true,
	'animation-iteration-count': true,
	'tab-size': true,
	'box-flex-group': true,
	'column-count': true,
	'counter-increment': true,
	'stop-opacity': true,
	'stroke-dashoffset': true,
	'stroke-opacity': true,
	'stroke-width': true,
	'transform': true,
	'transform-origin': true,
	'flex-grow': true,
	'flex-positive': true,
	'flex': true,
	'float': true,
	'fill-opacity': true,
	'font-weight': true,
	'grid-column': true,
	'flex-shrink': true,
	'line-height': true,
	'line-clamp': true,
	'flex-order': true,
	'opacity': true,
	'orphans': true,
	'order': true,
	'widows': true,
	'z-index': true,
	'zoom': true,
};

// Don't execute this in nodejS
if ( ExecutionEnvironment.canUseDOM )  {
	// get browser supported CSS properties
	const computed =  window.getComputedStyle(document.documentElement);
	const props = Array.prototype.slice.call(computed, 0);

	props.forEach(function(propName) {
		let prefix = propName[0] === "-" ? propName.substr(1, propName.indexOf("-", 1) - 1) : null;
		let stylePropName = propName.replace(reDash, (str) => str[1].toUpperCase());

		HOOK[stylePropName] =  {
			propName: propName.replace(reDash, str => str[1].toUpperCase()),
			unPrefixed: prefix ? propName.substr(prefix.length + 2) : propName,
			unitless: unitlessProperties[propName] ? true : false
		};
	});
}

// TODO! Find a way to solve this for SSR

export default HOOK;<commit_msg>removed dead code<commit_after>import ExecutionEnvironment from './ExecutionEnvironment';

const HOOK = {};
const reDash = /\-./g;

const unitlessProperties = {
	'box-flex': true,
	'animation-iteration-count': true,
	'tab-size': true,
	'box-flex-group': true,
	'column-count': true,
	'counter-increment': true,
	'stop-opacity': true,
	'stroke-dashoffset': true,
	'stroke-opacity': true,
	'stroke-width': true,
	'transform': true,
	'transform-origin': true,
	'flex-grow': true,
	'flex-positive': true,
	'flex': true,
	'float': true,
	'fill-opacity': true,
	'font-weight': true,
	'grid-column': true,
	'flex-shrink': true,
	'line-height': true,
	'line-clamp': true,
	'flex-order': true,
	'opacity': true,
	'orphans': true,
	'order': true,
	'widows': true,
	'z-index': true,
	'zoom': true
};

// Don't execute this in nodejS
if ( ExecutionEnvironment.canUseDOM )  {
	// get browser supported CSS properties
	const computed =  window.getComputedStyle(document.documentElement);
	const props = Array.prototype.slice.call(computed, 0);

	props.forEach(function(propName) {
		let prefix = propName[0] === '-' ? propName.substr(1, propName.indexOf('-', 1) - 1) : null;
		let stylePropName = propName.replace(reDash, (str) => str[1].toUpperCase());

		HOOK[stylePropName] =  {
			unPrefixed: prefix ? propName.substr(prefix.length + 2) : propName,
			unitless: unitlessProperties[propName] ? true : false
		};
	});
}

// TODO! Find a way to solve this for SSR

export default HOOK;
{'fraction_non_alphanumeric': 0.17480890661349285, 'fraction_numerical': 0.004985044865403789, 'mean_word_length': 4.522935779816514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '4791768', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1083, 'n_words': 253}