Inversion of control (IoC) for RequireJS