JavaScript dependency injection framework