js-util

Home > rc-js-util > mapConcat

mapConcat() function

Used with maps that store arrays. Where an array exists for a given key the values will be appended to that array, otherwise a copy of values array will be inserted.

Signature:

export declare function mapConcat<TKey, TValue>(map: Map<TKey, TValue[]>, key: TKey, values: readonly TValue[]): void;

Parameters

Parameter Type Description
map Map<TKey, TValue[]> The Map to check. May be modified.
key TKey The key to lookup in map.
values readonly TValue[] The values to concat.

Returns:

void

Remarks

See mapConcat().