JavaScript DI utility.