simple dependency injection for js