setIfUndefined = (map, key, createT) => {
  let set = map.get(key);

  if (set === undefined) {
    map.set(key, set = createT());
  }

  return set;
}
Get map property. Create T if property is undefined and set T on map.

```js
const listeners = map.setIfUndefined(events, 'eventName', set.create)
listeners.add(listener)
```

@function
@template T,K
@param {Map<K, T>} map
@param {K} key
@param {function():T} createT
@return {T}