The code for storing would be better represented as a map. You make an effort to not make socket a key despite using for / if constructs to treat it as such. Also, given the use of const and fat arrows, the increased use of es6 shouldn't pose a compatability problem.
I propose that it be rewritten to something like: (warning not tested)
The code for storing would be better represented as a map. You make an effort to not make socket a key despite using for / if constructs to treat it as such. Also, given the use of const and fat arrows, the increased use of es6 shouldn't pose a compatability problem.
I propose that it be rewritten to something like: (warning not tested)