After some reverse engineering:
cache
object contains map of modules, that are defined in-place. Module name is the key, the value is the function that calls define
(so it's the content of module).
*now
is a special keyword, it's absolutely not required, but once it is present, the function mapped under that key is executed with function that can be used to call additional require
, for example to load the NLS files.
The block
"*now":function (r) {
console.log('*now is called with argument: '+r)
}
prints:
now is called with argument: function (a1, a2, a3) { return contextRequire(a1, a2, a3, module, result); }
Function contextRequire
is defined in dojo.js
.