<commit_before>'use strict';

var clone = module.exports = function(obj, seen) {
  seen = seen || [];

  if (seen.indexOf(obj) > -1) {
    throw new Error('unable dereference circular structures');
  }

  if (!obj || typeof obj !== 'object') {
    return obj;
  }

  seen.push(obj);

  var target = Array.isArray(obj) ? [] : {};
<commit_msg>Ensure that we only compare against parents that we've seen.<commit_after>'use strict';

var clone = module.exports = function(obj, seen) {
  seen = seen || [];

  if (seen.indexOf(obj) > -1) {
    throw new Error('unable dereference circular structures');
  }

  if (!obj || typeof obj !== 'object') {
    return obj;
  }

  seen = seen.concat([obj]);

  var target = Array.isArray(obj) ? [] : {};

{'fraction_non_alphanumeric': 0.17162162162162162, 'fraction_numerical': 0.002702702702702703, 'mean_word_length': 3.3333333333333335, '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': '3267747', 'n_tokens_mistral': 243, 'n_tokens_neox': 236, 'n_words': 68}