<commit_before>"use strict";

var method = require("method")
var util = require("util")


// Render function takes arbitrary data structure and returns something
// that can visually represent it.
var render = method("render@interactivate")

render.define(Object, function(value, view) {
  return view.textContent = util.inspect(value)
})

render.define(function(value, view) {
  return view.textContent = value
})

render.define(Error, function(error, view) {
  return view.textContent = String(error)
})

render.implement(Element.prototype, function(element, view) {
  if (view.firstChild !== element) {
    view.innerHTML = ""
    view.appendChild(element)
  }
  return element
})

module.exports = render<commit_msg>Avoid HTLM element rendering issue.<commit_after>"use strict";

var method = require("method")
var util = require("util")


// Render function takes arbitrary data structure and returns something
// that can visually represent it.
var render = method("render@interactivate")

render.define(Object, function (value, view) {
  return view.textContent = util.inspect(value)
})

render.define(function (value, view) {
  if (value instanceof Node) {
    if (view.firstChild !== element) {
      view.innerHTML = ""
      view.appendChild(value)
    }
  }
  return view.textContent = value
})

render.define(Error, function (error, view) {
  return view.textContent = String(error)
})

module.exports = render
{'fraction_non_alphanumeric': 0.12438510189739986, 'fraction_numerical': 0.0, 'mean_word_length': 4.5408560311284045, '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': '7333723', 'n_tokens_mistral': 408, 'n_tokens_neox': 406, 'n_words': 113}