Function isPropertyPathEqual
-
Parameters
- pathA: PropertyPath
First property path.
- pathB: PropertyPath
Second property path.
Returns boolean
Whether both paths contain the same property-key segments in the same order.
Example
isPropertyPathEqual('actor.system.name', ['actor', 'system', 'name']);
// trueSegment comparison follows native
Map/ SameValueZero semantics:- Strings compare by value.
- Numbers compare with SameValueZero semantics, so
0equals-0andNaNequalsNaN. - Symbols compare by identity.
- Numeric and string segments remain distinct.
Invalid property paths return
falserather than throwing, matching predicate conventions. - pathA: PropertyPath
Determines whether two property paths are structurally equivalent.
Both paths are normalized before comparison, so an ordinary dotted path and its equivalent string-key array compare as equal: