Options
All
  • Public
  • Public/Protected
  • All
Menu

Module hasIn

Index

Functions Object

Object Functions

  • default(object: any, key: any): boolean
  • Checks if path is a direct or inherited property of object.

    since

    5.7.0

    see

    has,hasPath,[[hasPathIn]]

    example
    const object = create({ 'a': create({ 'b': 2 }) })

    hasIn(object, 'a')
    // => true

    hasIn(object, 'b')
    // => false

    Parameters

    • object: any

      The object to query.

    • key: any

      The key to check.

    Returns boolean

    Returns true if key exists, else false.