<commit_before>var baseGet = require('../base/baseGet')
var baseSlice = require('../base/baseSlice')
var isArguments = require('../lang/isArguments')
var isArray = require('../lang/isArray')
var isIndex = require('../lang/isIndex')
var isKey = require('../lang/isKey')
var isLength = require('../lang/isLength')
var last = require('../array/last')
var toPath = require('../string/toPath')
var hasOwn = require('./hasOwn')

// Checks if `path` is a direct property.

function has (object, path) {
  if (object == null) return false

  var result = hasOwnProperty.call(object, path)
  if (!result && !isKey(path)) {
    path = toPath(path)
    object = path.length === 1 ? object : baseGet(object, baseSlice(path, 0, 1))
    if (object == null) return false
    path = last(path)
    result = hasOwn(object, path)
  }
  return result || (
    isLength(object.length)<commit_msg>reformat object/hasProp.js<commit_after>var baseGet     = require('../base/baseGet')
var baseSlice   = require('../base/baseSlice')
var isArguments = require('../lang/isArguments')
var isArray     = require('../lang/isArray')
var isIndex     = require('../lang/isIndex')
var isKey       = require('../lang/isKey')
var isLength    = require('../lang/isLength')
var last        = require('../array/last')
var toPath      = require('../string/toPath')
var hasOwn      = require('./hasOwn')

// Checks if `path` is a direct property.

function has (object, path) {
  if (object == null) return false

  var result = hasOwn(object, path)

  if (!result && !isKey(path)) {
    path = toPath(path)

    object = path.length === 1
      ? object
      : baseGet(object, baseSlice(path, 0, 1))

    if (object == null) return false

    path = last(path)
    result = hasOwn(object, path)
  }
  return result || (
    isLength(object.length)
{'fraction_non_alphanumeric': 0.1698008849557522, 'fraction_numerical': 0.00331858407079646, 'mean_word_length': 3.256470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6162367', 'n_tokens_mistral': 579, 'n_tokens_neox': 568, 'n_words': 152}