Closed
Description
- Version: 15.5.0
- Platform: all
- Subsystem: module
What steps will reproduce the bug?
isPreloading
is documented in the Modules API section similar as e.g. createRequire
but actually it's not implemented as static API of module. It is implemented as prototype method:
const { isPreloading, createRequire } = require("module")
console.log(isPreloading, module.isPreloading) // prints undefined, false
console.log(createRequire, module.createRequire) // prints [Function: createRequire] undefined
How often does it reproduce? Is there a required condition?
always
What is the expected behavior?
docs and implementation should match
What do you see instead?
docs/impl doesn't match
Additional information
Refs: #36263
fyi @jasnell