Function hasProperty
Parameters
- data: object
An object to inspect.
- accessor: SafeAccessor
A dotted string accessor or an array of exact string, number, or symbol property keys.
Returns boolean
Whether the complete accessor path exists.
- data: object
An object to inspect.
A dotted string accessor or an array of exact string, number, or symbol property keys.
Whether the complete accessor path exists.
Determines whether an accessor path exists on an object.
Traversal aborts immediately when a property is missing, an intermediate value cannot be traversed, or an invalid array index is encountered. Properties whose values are
undefinedornullare considered present.Array indexes may only be accessed by number through the array accessor form.