We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57f5686 commit 1d24abcCopy full SHA for 1d24abc
lib/internal/modules/cjs/loader.js
@@ -64,6 +64,7 @@ const {
64
StringPrototypeSlice,
65
StringPrototypeSplit,
66
StringPrototypeStartsWith,
67
+ StringPrototypeToString
68
} = primordials;
69
70
// Map used to store CJS parsing data.
@@ -1295,7 +1296,7 @@ Module.syncBuiltinESMExports = function syncBuiltinESMExports() {
1295
1296
};
1297
1298
Module.isBuiltIn = function isBuiltIn(moduleName) {
- moduleName = StringPrototypeReplace(moduleName, /^node:/, '');
1299
+ moduleName = StringPrototypeReplace(StringPrototypeToString(moduleName), /^node:/, '');
1300
return ArrayPrototypeIncludes(Module.builtinModules, moduleName);
1301
1302
0 commit comments