Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use regex instead
Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
hemanth and ljharb authored Jun 14, 2022
commit 2376045b496528dad93ec859d67bd096a8ea12b3
2 changes: 1 addition & 1 deletion lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ Module.syncBuiltinESMExports = function syncBuiltinESMExports() {
};

Module.isBuiltIn = function isBuiltIn(moduleName) {
Comment thread
hemanth marked this conversation as resolved.
Outdated
moduleName = String(moduleName).replace('node:', '');
moduleName = StringPrototypeReplace(moduleName, /^node:/, '');
return Module.builtinModules.includes(moduleName);
Comment thread
hemanth marked this conversation as resolved.
Outdated
};

Expand Down