DEP0008: require('node:constants')
类型: 仅文档
node:constants
模块已弃用。
当需要访问与特定 Node.js 内置模块相关的常量时,开发者应改为参考相关模块公开的 constants
属性。
例如,require('node:fs').constants
和 require('node:os').constants
。
Type: Documentation-only
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
.