How to Refactor Long If or Switch Blocks with Double Dispatch in JavaScript | Dark Hacker News