module.builtinModules


版本历史
版本变更
v23.5.0

列表现在还包含前缀模块。

v9.3.0, v8.10.0, v6.13.0

新增于: v9.3.0, v8.10.0, v6.13.0

Node.js 提供的所有模块的名称列表。可用于验证模块是否由第三方维护。

\A list of the names of all modules provided by Node.js. Can be used to verify if a module is maintained by a third party or not.

此上下文中的 module模块封装器 提供的对象不同。要访问它,需要 Module 模块:

\module in this context isn't the same object that's provided by the module wrapper. To access it, require the Module module:

// module.mjs
// In an ECMAScript module
import { builtinModules as builtin } from 'node:module';// module.cjs
// In a CommonJS module
const builtin = require('node:module').builtinModules;

AltStyle によって変換されたページ (->オリジナル) /