Which version of the code resonates with how you think about things?
I'm sure there are problems with this code and there are likely better ways but I chose each of these implementations on purpose.
Please answer in the gist comments so I can track them. We can carry on the conversation in chat ##javascript or #Node.js.