a simple JavaScript IoC container