Search posts, tags, users, and pages
Nate Sire
I often use object literals in place of if/else or switch statements. JS is nice about that.
Maxi Contieri
That's ok if it brings more declarativeness
But switches violate open closed principle so they are yet another code smell