<commit_before>const wrapObject = require(`./wrapObject`)
const hasToJS = require(`./hasToJS`)

module.exports = function transformChildren (children) {
  const _children = hasToJS(children) ? children.toJS() : children
  return wrapObject(_children)
}<commit_msg>Children will always be an array, check children for toJS<commit_after>const wrapObject = require(`./wrapObject`)
const hasToJS = require(`./hasToJS`)

module.exports = function transformChildren (children) {
  const _children = children.map(child => hasToJS(child) ? child.toJS() : child)
  return wrapObject(_children)
}
{'fraction_non_alphanumeric': 0.12286689419795221, 'fraction_numerical': 0.0, 'mean_word_length': 6.072289156626506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '889505', 'n_tokens_mistral': 167, 'n_tokens_neox': 165, 'n_words': 44}