* Provide one of Node.js' public modules to user code. * @param {string} id - The identifier/specifier of the builtin module to load * @returns {object|undefined}
(id)
| 118 | * @returns {object|undefined} |
| 119 | */ |
| 120 | function loadBuiltinModule(id) { |
| 121 | if (!BuiltinModule.canBeRequiredByUsers(id)) { |
| 122 | return; |
| 123 | } |
| 124 | /** @type {import('internal/bootstrap/realm.js').BuiltinModule} */ |
| 125 | const mod = BuiltinModule.map.get(id); |
| 126 | debug('load built-in module %s', id); |
| 127 | // compileForPublicLoader() throws if canBeRequiredByUsers is false: |
| 128 | mod.compileForPublicLoader(); |
| 129 | return mod; |
| 130 | } |
| 131 | |
| 132 | let isSEABuiltinWarningNeeded_; |
| 133 | function isSEABuiltinWarningNeeded() { |
no test coverage detected
searching dependent graphs…