<commit_before>export function getAccessor (node, name) {
  if (name === 'class') {
    return node.className;
  } else if (name === 'style') {
    return node.style.cssText;
  // most things
  } else if (name !== 'type' && name in node) {
    return node[name];
  // real DOM elements
  } else if (node.getAttribute) {
    return node.getAttribute(name);
  // vDOM nodes
  } else if (node.attributes && node.attributes[name]) {
    return node.attributes[name].value;
  }
}

export function mapAccessor (node, name, value) {
  if (name === 'class') {
    node.className = value;
  } else if (name === 'style') {
    node.style = { cssText: value };
  }
}

export function removeAccessor (node, name) {
  if (name === 'class') {
    node.className = '';
  } else if (name === 'style') {
    node.style.cssText = '';
  // most things
  } else if (name !== 'type' && name in node) {
    node[name] = '';
  // real DOM elements
  } else if (node.removeAttribute) {
    node.removeAttribute(name);
  // vDOM nodes
  } else if (node.attributes) {
    delete node.attributes[name];
  }
}

export function setAccessor (node, name, value) {
  if (name === 'class') {
    node.className = value;
  } else if (name === 'style') {
    node.style.cssText = value;
  // most things
  } else if (name !== 'type' && name in node) {
    node[name] = value;
  // real DOM elements
  } else if (node.setAttribute) {
    node.setAttribute(name, value);
  // vDOM nodes
  } else if (node.attributes) {
    node.attributes[node.attributes.length] = node.attributes[name] = { name, value };
  }
}
<commit_msg>Force set a property if the value is anything but a strong, but so long as it's not setting the special content property.<commit_after>export function getAccessor (node, name) {
  if (name === 'class') {
    return node.className;
  } else if (name === 'style') {
    return node.style.cssText;
  // most things
  } else if (name !== 'type' && name in node) {
    return node[name];
  // real DOM elements
  } else if (node.getAttribute) {
    return node.getAttribute(name);
  // vDOM nodes
  } else if (node.attributes && node.attributes[name]) {
    return node.attributes[name].value;
  }
}

export function mapAccessor (node, name, value) {
  if (name === 'class') {
    node.className = value;
  } else if (name === 'style') {
    node.style = { cssText: value };
  }
}

export function removeAccessor (node, name) {
  if (name === 'class') {
    node.className = '';
  } else if (name === 'style') {
    node.style.cssText = '';
  // most things
  } else if (name !== 'type' && name in node) {
    node[name] = '';
  // real DOM elements
  } else if (node.removeAttribute) {
    node.removeAttribute(name);
  // vDOM nodes
  } else if (node.attributes) {
    delete node.attributes[name];
  }
}

export function setAccessor (node, name, value) {
  if (name === 'class') {
    node.className = value;
  } else if (name === 'style') {
    node.style.cssText = value;
  // most things
  } else if (name !== 'type' && name in node || typeof value !== 'string' && name !== 'content') {
    node[name] = value;
  // real DOM elements
  } else if (node.setAttribute) {
    node.setAttribute(name, value);
  // vDOM nodes
  } else if (node.attributes) {
    node.attributes[node.attributes.length] = node.attributes[name] = { name, value };
  }
}

{'fraction_non_alphanumeric': 0.1635163516351635, 'fraction_numerical': 0.0, 'mean_word_length': 2.9643281807372177, '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': '6052321', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1068, 'n_words': 315}