<commit_before>import React from 'react';

const isProps = input => (
  input !== null && typeof input === 'object' && !React.isValidElement(input)
);

export default function createElement(type, propsOrNode, ...nodes) {
  const args = isProps(propsOrNode) ?
    [type, propsOrNode, ...nodes] :
    [type, {}, propsOrNode, ...nodes];
  return React.createElement.apply(null, args);
}
<commit_msg>Transform props in createElement.<commit_after>import React from 'react';

import transformProps from './transformProps';

const isProps = input => (
  input !== null && typeof input === 'object' && !React.isValidElement(input)
);

export default function createElement(type, propsOrNode, ...nodes) {
  const args = isProps(propsOrNode) ?
    [type, transformProps(propsOrNode), ...nodes] :
    [type, {}, propsOrNode, ...nodes];
  return React.createElement.apply(null, args);
}

{'fraction_non_alphanumeric': 0.1598173515981735, 'fraction_numerical': 0.0, 'mean_word_length': 4.550632911392405, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1316657', 'n_tokens_mistral': 256, 'n_tokens_neox': 259, 'n_words': 69}