module.parent


稳定性: 0 - 已弃用:请改用 require.mainmodule.children

首次引用此模块的模块,如果当前模块是当前进程的入口点,则为 null;如果模块是由非 CommonJS 模块加载的(例如:REPL 或 import),则为 undefined

【The module that first required this one, or null if the current module is the entry point of the current process, or undefined if the module was loaded by something that is not a CommonJS module (E.G.: REPL or import).】