<commit_before>var deserialize_cells = function(clipboardData) {
  var gridData = clipboardData.getData('react/object-grid');
  if (gridData) {
    return JSON.parse(gridData);
  }
  var tabbedData = clipboardData.getData('text/plain');
  if (tabbedData) {
    var rows = [];
    var lines = tabbedData.split('\n');
    for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) {
      var columns = [];
      var tabs = lines[lineIndex].split('\t');
      for (var tabIndex = 0; tabIndex < tabs.length; tabIndex++) {
        columns.push(tabs[tabIndex]);
      }
      rows.push(columns);
    }
    return rows;
  }
  return [];
};

var string_value = function(value) {
  switch (typeof value) {

    case 'number':
      return value.toString();

    case 'object':
      if (value === null)
        return '';<commit_msg>handle serialization of arrays better<commit_after>var deserialize_cells = function(clipboardData) {
  var gridData = clipboardData.getData('react/object-grid');
  if (gridData) {
    return JSON.parse(gridData);
  }
  var tabbedData = clipboardData.getData('text/plain');
  if (tabbedData) {
    var rows = [];
    var lines = tabbedData.split('\n');
    for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) {
      var columns = [];
      var tabs = lines[lineIndex].split('\t');
      for (var tabIndex = 0; tabIndex < tabs.length; tabIndex++) {
        columns.push(tabs[tabIndex]);
      }
      rows.push(columns);
    }
    return rows;
  }
  return [];
};

var string_value = function(value) {
  switch (typeof value) {
    case 'number':
      return value.toString();

    case 'object':
      if (Array.isArray(value)) {
        var stringValue = '';
        for (var valueIndex = 0; valueIndex < value.length; valueIndex++) {
          stringValue += string_value(value[valueIndex])
          if (valueIndex < value.length - 1)
            stringValue += ', ';
        }
        return stringValue;
      }

      if (value === null)
        return '';
{'fraction_non_alphanumeric': 0.14478282576135795, 'fraction_numerical': 0.0029955067398901645, 'mean_word_length': 2.6906077348066297, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '4287715', 'n_tokens_mistral': 622, 'n_tokens_neox': 614, 'n_words': 144}