<commit_before>function createEvent(type) {
  const event = document.createEvent("HTMLEvents");

  event.initEvent(type, true, true);

  return event;
}

function filterNodes(nodes, predicate) {
  const filteredNodes = [];

  for (let i = 0; i < nodes.length; i += 1) {
    const node = nodes.item(i);

    if (predicate(node)) {
      filteredNodes.push(node);
    }
  }

  return filteredNodes;
}

function isSignificantNode(node) {
  if (node.nodeType === 1) {
    return true;
  }

  if (node.nodeType === 3 && node.wholeText.trim().length > 0) {
    return true;
  }

  return false;
}

function getSignificantNodes(element) {
  return filterNodes(element.childNodes, isSignificantNode);
}

window.createEvent = createEvent;
window.getSignificantNodes = getSignificantNodes;<commit_msg>Remove unused Jasmine helpers<commit_after>function createEvent(type) {
  const event = document.createEvent("HTMLEvents");

  event.initEvent(type, true, true);

  return event;
}

window.createEvent = createEvent;
{'fraction_non_alphanumeric': 0.12624254473161034, 'fraction_numerical': 0.004970178926441352, 'mean_word_length': 4.272251308900524, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6780438', 'n_tokens_mistral': 341, 'n_tokens_neox': 317, 'n_words': 70}