Why and how to do dependency injection in javascript | Dark Hacker News