<commit_before>'use strict'

var fn = function (something) {
  if (something === void 0 || something === null) return String(something)

  var classToType = {
    '[object Arguments]': 'arguments',
    '[object Array]': 'array',
    '[object ArrayBuffer]': 'arraybuffer',
    '[object Boolean]': 'boolean',
    '[object Date]': 'date',
    '[object Error]': 'error',
    '[object Float32Array]': 'float32array',
    '[object Float64Array]': 'float64array',
    '[object Function]': 'function',
    '[object GeneratorFunction]': 'generatorfunction',
    '[object Int16Array]': 'int16array',
    '[object Int32Array]': 'int32array',
    '[object Int8Array]': 'int8array',
    '[object Map]': 'map',
    '[object Number]': 'number',
    '[object Object]': 'object',
    '[object RegExp]': 'regexp',
    '[object Set]': 'set',
    '[object String]': 'string',
    '[object Symbol]': 'symbol',
    '[object Uint16Array]': 'uint16array',
    '[object Uint32Array]': 'uint32array',
    '[object Uint8Array]': 'uint8array',
    '[object Uint8ClampedArray]': 'uint8clampedarray',
    '[object WeakMap]': 'weakmap',
    '[object WeakSet]': 'weakset'
  }

  return classToType[Object.prototype.toString.call(something)]
}

module.exports = fn

module.exports.types = [
  'arguments',
  'array',
  'arraybuffer',
  'boolean',
  'date',
  'error',
  'float32array',
  'float64array',
  'function',
  'generatorfunction',
  'int16array',
  'int32array',
  'int8array',
  'map',
  'number',
  'object',<commit_msg>calculate type names live instead of dictionary lookup<commit_after>'use strict'

var fn = function (something) {
  if (something === void 0 || something === null) return String(something)
  var className = Object.prototype.toString.call(something
    ).replace(/^\[Object\s/i, '').replace(/\]$/, '').toLowerCase();
  if (module.exports.types.indexOf(className) >= 0) { return className; }
  return '?unsupported?:' + className;
}

module.exports = fn

module.exports.types = [
  'arguments',
  'array',
  'arraybuffer',
  'boolean',
  'date',
  'error',
  'float32array',
  'float64array',
  'function',
  'generatorfunction',
  'int16array',
  'int32array',
  'int8array',
  'map',
  'number',
  'object',
{'fraction_non_alphanumeric': 0.19084315503173163, 'fraction_numerical': 0.023118766999093383, 'mean_word_length': 4.3180722891566266, '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': '4052980', 'n_tokens_mistral': 750, 'n_tokens_neox': 750, 'n_words': 168}