a simple dependency injection for js