Function concatPropertyPath

  • Concatenates one or more property paths into a newly allocated exact property-key path.

    Every path is normalized before concatenation. Dotted strings therefore contribute one segment per delimiter, while array property-keys preserve numbers, symbols, empty-string keys, and literal periods exactly. The returned array is independent of every input array and may be retained or modified by the caller without affecting those inputs.

    Parameters

    Returns readonly PropertyKey[]

    A newly allocated exact property-key path.

    concatPropertyPath('actor.system', ['attributes', 'hp'], 'value');
    // ['actor', 'system', 'attributes', 'hp', 'value']

    If any argument is not a valid PropertyPath or no path is supplied at runtime.