DEP0008:require('node:constants')


类型:仅文档

¥Type: Documentation-only

node:constants 模块已弃用。当需要访问与特定 Node.js 内置模块相关的常量时,开发者应改为引用相关模块公开的 constants 属性。例如,require('node:fs').constantsrequire('node:os').constants

¥The node:constants module is deprecated. When requiring access to constants relevant to specific Node.js builtin modules, developers should instead refer to the constants property exposed by the relevant module. For instance, require('node:fs').constants and require('node:os').constants.