Semantic switch statement for node.js