MCPcopy
hub / github.com/buildbot/buildbot / pushIntoMapOfArrays

Function pushIntoMapOfArrays

www/ui/src/util/Collections.ts:18–26  ·  view source on GitHub ↗
(map: Map<Key, ValueItem[]>,
                                                    key: Key, value: ValueItem)

Source from the content-addressed store, hash-verified

16*/
17
18export function pushIntoMapOfArrays<Key, ValueItem>(map: Map<Key, ValueItem[]>,
19 key: Key, value: ValueItem) {
20 const existingValues = map.get(key);
21 if (existingValues === undefined) {
22 map.set(key, [value]);
23 return;
24 }
25 existingValues.push(value);
26}

Callers 3

buildTagTreeFunction · 0.85
ConsoleView.tsxFile · 0.85
groupBuildsPerBuilderFunction · 0.85

Calls 3

pushMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected