<commit_before>var React = require('react');
/**
 * An addon to render with ReactJs
 */
var RenderWithReact = module.exports = {
  // Overrides default make
  make: function (tagName, attribute, dataAttribute, content) {
    return React.createElement(tagName, RenderWithReact.filter(attribute), content);
  },
  filter: function (props) {
    var keys = Object.keys(props);
    var newProps = {};

    for(var i = 0; i < keys.length; i++) {
      if (keys[i] == 'class') {
        newProps['className'] = props[keys[i]];
      } else if (/-/.test(keys[i])) {
        var key = keys[i].replace(/(.*)-(.*)/, function (match, p1, p2) {
          return p1 + p2[0].toUpperCase() + p2.slice(1, p2.length);
        });
        newProps[key] = props[keys[i]];
      } else {
        newProps[keys[i]] = props[keys[i]];
      }
    }
    return newProps;
  },
  // Overrides default append
  append: function (parent, childs) {
    if (parent === '') {
      return childs;
    }

    if (Object.prototype.toString.call(childs) !== '[object Array]') {
      childs = [childs];
    }

    childs.unshift(parent._store.props);
    childs.unshift(parent.type);
    return React.createElement.apply(self, childs);
  },
 postRender: function (content) {
    if (this.postRenderWithProps) {
      return content;
    }

    var props = this.postRenderWithProps() || 0;
    return React.createElement(props.type, props.props, content);
  }
}<commit_msg>:bug: Fix typo caused by global replace<commit_after>var React = require('react');
/**
 * An addon to render with ReactJs
 */
var RenderWithReact = module.exports = {
  // Overrides default make
  make: function (tagName, attribute, dataAttribute, content) {
    return React.createElement(tagName, RenderWithReact.filter(attribute), content);
  },
  filter: function (props) {
    var keys = Object.keys(props);
    var newProps = {};

    for(var i = 0; i < keys.length; i++) {
      if (keys[i] == 'class') {
        newProps['className'] = props[keys[i]];
      } else if (/-/.test(keys[i])) {
        var key = keys[i].replace(/(.*)-(.*)/, function (match, p1, p2) {
          return p1 + p2[0].toUpperCase() + p2.slice(1, p2.length);
        });
        newProps[key] = props[keys[i]];
      } else {
        newProps[keys[i]] = props[keys[i]];
      }
    }
    return newProps;
  },
  // Overrides default append
  append: function (parent, childs) {
    if (parent === '') {
      return childs;
    }

    if (Object.prototype.toString.call(childs) !== '[object Array]') {
      childs = [childs];
    }

    childs.unshift(parent._store.props);
    childs.unshift(parent.type);
    return React.createElement.apply(self, childs);
  },
 postRender: function (content) {
    if (!this.renderWithProps) {
      return content;
    }

    var props = this.renderWithProps() || 0;
    return React.createElement(props.type, props.props, content);
  }
}
{'fraction_non_alphanumeric': 0.16603382809803244, 'fraction_numerical': 0.0069036934760096655, 'mean_word_length': 2.7981651376146788, 'pattern_counts': {'":': 0, '<': 5, '<?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': '630124', 'n_tokens_mistral': 953, 'n_tokens_neox': 941, 'n_words': 212}