diff --git a/lib/require.js b/lib/require.js index cb7b253..fcd9053 100644 --- a/lib/require.js +++ b/lib/require.js @@ -38,14 +38,14 @@ const require = function(){ throw new ReferenceError("Unable to get non relative module " + module + "!"); } - require.register = function(module, scope = {}){ - if (!require.exists(module)){ - const scopeName = getScopeName(module); - scope[scopeName] = scope; - return scope; + require.register = function(moduleName, module = {}){ + if (!require.exists(moduleName)){ + const scopeName = getScopeName(moduleName); + scope[scopeName] = module; + return module; } else { - require("./logging").error("Module", module, "already registered."); + require("./logging").error("Module", moduleName, "already registered."); } };