Dependency Injection container in JS