(eventName, handler)
| 1 | const map = {} |
| 2 | |
| 3 | function on(eventName, handler) { |
| 4 | map[eventName] = map[eventName] || [] |
| 5 | map[eventName].push(handler) |
| 6 | } |
| 7 | |
| 8 | function off(eventName, handler) { |
| 9 | const handlerList = map[eventName] |
nothing calls this directly
no outgoing calls
no test coverage detected