Function isPropertyPathEqual

  • 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:

    Parameters

    Returns boolean

    Whether both paths contain the same property-key segments in the same order.

    isPropertyPathEqual('actor.system.name', ['actor', 'system', 'name']);
    // true

    Segment comparison follows native Map / SameValueZero semantics:

    • Strings compare by value.
    • Numbers compare with SameValueZero semantics, so 0 equals -0 and NaN equals NaN.
    • Symbols compare by identity.
    • Numeric and string segments remain distinct.

    Invalid property paths return false rather than throwing, matching predicate conventions.