module.parent


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

¥Stability: 0 - Deprecated: Please use require.main and module.children instead.

第一个需要此模块的模块,如果当前模块是当前进程的入口点,则为 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).