Function getPropertyOwner
-
Parameters
- data: object
Object to inspect.
- path: PropertyPath
Dotted or exact property-key path.
Optionaloptions: { hasOwnOnly?: boolean }Property lookup options.
-
OptionalhasOwnOnly?: booleanWhether every path segment must be an own property; default:
false.
-
Returns object
The terminal property owner, or
undefinedwhen the path cannot be resolved. - data: object
Returns the object that owns the final property resolved by a property path.
The owner may be the object reached directly by the parent path or one of its prototypes. Intermediate values are read to continue traversal, but the final property value is not read. Set
hasOwnOnlytotrueto require every segment, including the terminal property, to be owned directly by the value reached at that depth.