• Has - Checks if path is a direct property of object.

    Parameters

    • obj: Record<any, any>
    • path: string | string[]

    Returns boolean

    {boolean}

    Example

    has({ 'a': { 'b': 2 } }, 'a');
    // returns true

    has({ 'a': { 'b': 2 } }, 'a');
    // returns true

Generated using TypeDoc