Dependency injection framework for javascript based on parameter names