function get_require(currentModule) {
            var result = function require(moduleId) {
                if (moduleId.match(/^\.{1,2}\//)) {
                    moduleId = normalize(currentModule, moduleId)
                }
                if (hop(ModuleStore, moduleId)) {
                    var module = ModuleStore[moduleId]
                    if (module.__isLoading) {
                        if (WarnOnRecursiveRequire) {
                            var fromModule = currentModule ? currentModule.id : "<root>"
                            console.log("module '" + moduleId + "' recursively require()d from '" + fromModule + "', problem?")
                        }
                    }
                    currentModule.moduleIdsRequired.push(moduleId)
                    return module.exports
                }
                if (!hop(ModulePreloadStore, moduleId)) {
                    var fromModule = currentModule ? currentModule.id : "<root>"
                    error("module '" + moduleId + "' not found from '" + fromModule + "', must be define()'d first")
                }
                var factory = ModulePreloadStore[moduleId][0]
                var prereqs = ModulePreloadStore[moduleId][1]
                var module = create_module(moduleId)
                var newRequire = get_require(module)
                ModuleStore[moduleId] = module
                module.__isLoading = true
                try {
                    currentModule.moduleIdsRequired.push(moduleId)
                    var prereqModules = []
                    for (var i = 0; i < prereqs.length; i++) {
                        var prereqId = prereqs[i]
                        var prereqModule
                        if (prereqId == "require") prereqModule = newRequire
                        else if (prereqId == "exports") prereqModule = module.exports
                        else if (prereqId == "module") prereqModule = module
                        else prereqModule = newRequire(prereqId)
                        prereqModules.push(prereqModule)
                    }
                    if (typeof factory == "function") {
                        var result = factory.apply(null, prereqModules)
                        if (result) {
                            module.exports = result
                        }
                    } else {
                        module.exports = factory
                    }
                } finally {
                    module.__isLoading = false
                }
                return module.exports
            }
            result.define = require_define
            result.implementation = PROGRAM
            result.version = VERSION
            return result
        }
Dec 11 2016, wuchangming
 add a global consoleforspydebugger to enhance `console` for prevent `log message` lost
 before Document 'load' and 'DOMContentLoaded'.