<commit_before>import numeral from "numeral"
export default ( number, points ) =>
  numeral( points > 0 ? Math.round( number * ( 10 ** points ) ) / 10 ** points : Math.round( number ) )
  .format( "0.[00]a" ).toUpperCase()<commit_msg>Updated rounding helper to handle errors<commit_after>import numeral from "numeral"
export default ( number, points ) => {
  try {
    return numeral( points > 0 ? Math.round( number * ( 10 ** points ) ) / 10 ** points : Math.round( number ) )
    .format( "0.[00]a" ).toUpperCase()
  } catch ( e ) {
    console.log( e )
  }
}
{'fraction_non_alphanumeric': 0.1622103386809269, 'fraction_numerical': 0.0285204991087344, 'mean_word_length': 3.390625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3992283', 'n_tokens_mistral': 196, 'n_tokens_neox': 182, 'n_words': 54}