code: function (entry) {
                  (map['$' + entry.type] || (map['$' + entry.type] = [])).push(entry)
                  return entry
                }
docs: our map stores arrays by event type, just because it's better than storing everything in a single array. uses '$' as a prefix for the keys for safety