<commit_before>var defaultLocale = require("../core/locale/languages/en_US.js")

// Formats numbers to look "pretty"
module.exports = function( number , key , vars ) {

  if ( vars && key && (
       ( key === vars.x.value && vars.x.scale.value === "log" ) ||
       ( key === vars.y.value && vars.y.scale.value === "log" ) ) ) {

    var superscript = "⁰¹²³⁴⁵⁶⁷⁸⁹"
      , formatPower = function(d) {
          return (d + "").split("").map(function(c) {
            return superscript[c]
          }).join("")
        }

    return 10 + " " + formatPower( Math.round(Math.log(number) / Math.LN10) )

  }

  if ( "locale" in this ) {
    var time = this.locale.value.time
  }
  else {
    var time = defaultLocale.time
  }

  if ( vars && typeof vars.time.value === "string") {
    time.push(vars.time.value)
  }

  if (typeof key === "string" && time.indexOf(key.toLowerCase()) >= 0) {<commit_msg>fixed bugs in number formatter<commit_after>var defaultLocale = require("../core/locale/languages/en_US.js")

// Formats numbers to look "pretty"
module.exports = function( number , key , vars ) {

  if ( vars && key && vars.x && vars.y && (
       ( key === vars.x.value && vars.x.scale.value === "log" ) ||
       ( key === vars.y.value && vars.y.scale.value === "log" ) ) ) {

    var superscript = "⁰¹²³⁴⁵⁶⁷⁸⁹"
      , formatPower = function(d) {
          return (d + "").split("").map(function(c) {
            return superscript[c]
          }).join("")
        }

    return 10 + " " + formatPower( Math.round(Math.log(number) / Math.LN10) )

  }

  if ( "locale" in this ) {
    var time = this.locale.value.time
  }
  else {
    var time = defaultLocale.time
  }

  if ( vars && vars.time && typeof vars.time.value === "string") {
    time.push(vars.time.value)
  }

  if (typeof key === "string" && time.indexOf(key.toLowerCase()) >= 0) {
{'fraction_non_alphanumeric': 0.18777056277056278, 'fraction_numerical': 0.005411255411255411, 'mean_word_length': 2.436802973977695, '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': '6160516', 'n_tokens_mistral': 682, 'n_tokens_neox': 645, 'n_words': 133}