<commit_before>/*!
 * object-visit <https://github.com/jonschlinkert/object-visit>
 *
 * Copyright (c) 2015, <NAME>.
 * Licensed under the MIT License.
 */

'use strict';

var isObject = require('isobject');

module.exports = function visit(thisArg, method, target) {
  if (!isObject(thisArg) && typeof thisArg !== 'function') {
    throw new Error('object-visit expects `thisArg` to be an object.');
  }

  if (typeof method !== 'string') {
    throw new Error('object-visit expects `method` to be a string');
  }

  if (!isObject(target) && typeof thisArg !== 'function') {
    throw new Error('object-visit expects `target` to be an object.');
  }

  for (var key in target) {
    thisArg[method](key, target[key]);
  }
  return thisArg;
};<commit_msg>don't fail when target is not an object<commit_after>/*!
 * object-visit <https://github.com/jonschlinkert/object-visit>
 *
 * Copyright (c) 2015, <NAME>.
 * Licensed under the MIT License.
 */

'use strict';

var isObject = require('isobject');

module.exports = function visit(thisArg, method, target) {
  if (!isObject(thisArg) && typeof thisArg !== 'function') {
    throw new Error('object-visit expects `thisArg` to be an object.');
  }

  if (typeof method !== 'string') {
    throw new Error('object-visit expects `method` name to be a string');
  }

  target = target || {};
  for (var key in target) {
    thisArg[method](key, target[key]);
  }
  return thisArg;
};
{'fraction_non_alphanumeric': 0.16083916083916083, 'fraction_numerical': 0.005594405594405594, 'mean_word_length': 3.8181818181818183, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1802433', 'n_tokens_mistral': 460, 'n_tokens_neox': 448, 'n_words': 140}