<commit_before>import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';

// Enables DRY and simple conditional components
// Renders items when 'show' prop is undefined

const Conditional = function (Component) {
  return createReactClass({
    propTypes: {
      show: PropTypes.bool
    },

    render() {
      if (this.props.show === undefined || this.props.show) {
        return (<Component {...this.props} />);
      }
      return false;
    }
  });
};

export default Conditional;<commit_msg>Add displayName for Conditional HOC<commit_after>import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';

// Enables DRY and simple conditional components
// Renders items when 'show' prop is undefined

const Conditional = function (Component) {
  return createReactClass({
    displayName: `Conditional${Component.displayName}`,

    propTypes: {
      show: PropTypes.bool
    },

    render() {
      if (this.props.show === undefined || this.props.show) {
        return (<Component {...this.props} />);
      }
      return false;
    }
  });
};

export default Conditional;
{'fraction_non_alphanumeric': 0.12217573221757322, 'fraction_numerical': 0.0, 'mean_word_length': 3.2562277580071175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4439564', 'n_tokens_mistral': 336, 'n_tokens_neox': 335, 'n_words': 99}