• Checks if path is a direct or inherited property of object.

    Type Parameters

    • T

    Parameters

    • object: T

      The object to query.

    • path: PropertyPath

      The path to check.

    Returns boolean

    Returns true if path exists, else false.

    Example

    var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });

    _.hasIn(object, 'a');
    // => true

    _.hasIn(object, 'a.b.c');
    // => true

    _.hasIn(object, ['a', 'b', 'c']);
    // => true

    _.hasIn(object, 'b');
    // => false

Generated using TypeDoc