<commit_before>import _ from 'lodash';
import React, {Component} from 'react'; import PropTypes from 'prop-types';
import {Level, LevelSection, LevelItem} from '../';

const defaultValueRenderer = function(v) {
  return (
    <span>{v}</span>
  );
};

class Property extends Component {
  static displayName = 'Property';
  static propTypes = {
    valueRenderer: PropTypes.any,
    name: PropTypes.string,
    value: PropTypes.any
  };
  static defaultProps = {
    valueRenderer: defaultValueRenderer
  };

  render() {
    const {valueRenderer, value, name} = this.props;
    return (
      <li>
        <Level>
          <LevelSection left>
            <LevelItem>
              {_.startCase(name)}
            </LevelItem>
          </LevelSection>
          <LevelSection right>
            <LevelItem>
              {valueRenderer(value)}
            </LevelItem>
          </LevelSection>
        </Level>
      </li>
    );
  }
}

export default class Wizzbanger extends Component {
  static displayName = 'Wizzbanger';
  static propTypes = {
    object: PropTypes.object,
    title: PropTypes.string,
    visitors: PropTypes.object,
  };
  static defaultProps = {
    visitors: {}
  };

  render() {
    const {object, title, visitors} = this.props;
    const tit = title
      ? <h4 className="title is-4" style={{marginBottom: '.25em'}}>{_.startCase(title)}</h4>
      : null;
    return (
      <div className="wizzbanger">
        {tit}
        <ul>
          {_.map(object, (v, k) => _.isPlainObject(v)
            ? <Wizzbanger key={k} title={k} object={v} visitors={visitors[k]}/>
            : <Property key={k} name={k} value={v} valueRenderer={visitors[k]}/>)}
        </ul>
      </div>
    );
  }

}
<commit_msg>trailing comma<commit_after>import _ from 'lodash';
import React, {Component} from 'react'; import PropTypes from 'prop-types';
import {Level, LevelSection, LevelItem} from '../';

const defaultValueRenderer = function(v) {
  return (
    <span>{v}</span>
  );
};

class Property extends Component {
  static displayName = 'Property';
  static propTypes = {
    valueRenderer: PropTypes.any,
    name: PropTypes.string,
    value: PropTypes.any
  };
  static defaultProps = {
    valueRenderer: defaultValueRenderer
  };

  render() {
    const {valueRenderer, value, name} = this.props;
    return (
      <li>
        <Level>
          <LevelSection left>
            <LevelItem>
              {_.startCase(name)}
            </LevelItem>
          </LevelSection>
          <LevelSection right>
            <LevelItem>
              {valueRenderer(value)}
            </LevelItem>
          </LevelSection>
        </Level>
      </li>
    );
  }
}

export default class Wizzbanger extends Component {
  static displayName = 'Wizzbanger';
  static propTypes = {
    object: PropTypes.object,
    title: PropTypes.string,
    visitors: PropTypes.object
  };
  static defaultProps = {
    visitors: {}
  };

  render() {
    const {object, title, visitors} = this.props;
    const tit = title
      ? <h4 className="title is-4" style={{marginBottom: '.25em'}}>{_.startCase(title)}</h4>
      : null;
    return (
      <div className="wizzbanger">
        {tit}
        <ul>
          {_.map(object, (v, k) => _.isPlainObject(v)
            ? <Wizzbanger key={k} title={k} object={v} visitors={visitors[k]}/>
            : <Property key={k} name={k} value={v} valueRenderer={visitors[k]}/>)}
        </ul>
      </div>
    );
  }

}

{'fraction_non_alphanumeric': 0.1438869665513264, 'fraction_numerical': 0.0028835063437139563, 'mean_word_length': 2.3291746641074855, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 49, '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': '3261564', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1073, 'n_words': 241}