<commit_before>import React from 'react'
import { RichText } from 'prismic-reactjs'
const Elements = RichText.Elements

const newLine = text =>
  text.search(/\n/) > 0
  ? text.split('\n').map((item, key) => {
      return <Fragment key={s4()}>{item}<br/></Fragment>
    })
  : text

const propsWithUniqueKey = function(props, key) {
  return Object.assign(props || {}, { key })
}<commit_msg>safe serializer<commit_after>import React from 'react'
import { RichText } from 'prismic-reactjs'
const Elements = RichText.Elements

const newLine = text => {
  if (text !== undefined) {
    return text.search(/\n/) > 0
    ? text.split('\n').map((item, key) => {
        return <Fragment key={s4()}>{item}<br/></Fragment>
      })
    : text
  }
  return text
}
const propsWithUniqueKey = function(props, key) {
  return Object.assign(props || {}, { key })
}
{'fraction_non_alphanumeric': 0.1772300469483568, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 3.635869565217391, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '6169133', 'n_tokens_mistral': 286, 'n_tokens_neox': 278, 'n_words': 65}