<commit_before>'use strict';

var value    = require('es5-ext/object/valid-value')
  , memoize  = require('memoizee/weak-plain')
  , document = require('../valid-html-document');

var getHtmlToDom = memoize(function (document) {
	var el = document.createElement('p'), df;
	return function (html) {
		el.innerHTML = html;
		switch (el.childNodes.length) {
		case 0:
			return null;
		case 1:
			return el.firstChild;<commit_msg>Use more generic element<commit_after>'use strict';

var value    = require('es5-ext/object/valid-value')
  , memoize  = require('memoizee/weak-plain')
  , document = require('../valid-html-document');

var getHtmlToDom = memoize(function (document) {
	var el = document.createElement('div'), df;
	return function (html) {
		el.innerHTML = html;
		switch (el.childNodes.length) {
		case 0:
			return null;
		case 1:
			return el.firstChild;
{'fraction_non_alphanumeric': 0.14763552479815456, 'fraction_numerical': 0.006920415224913495, 'mean_word_length': 4.046511627906977, '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': '6862789', 'n_tokens_mistral': 308, 'n_tokens_neox': 286, 'n_words': 66}