File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,7 @@ const builtins: string[] = [
83
83
... builtinModules ,
84
84
' node:sea' ,
85
85
' node:test' ,
86
- ' node:sqlite' ,
87
- ' node:test/reporters'
86
+ ' node:sqlite'
88
87
]
89
88
90
89
/**
@@ -110,16 +109,18 @@ const BUILTIN_MODULES: Set<string> = new Set(builtins.flatMap(m => {
110
109
* @example
111
110
* isBuiltin('fs/promises') // true
112
111
* @example
112
+ * isBuiltin(new URL('node:os')) // true
113
+ * @example
113
114
* isBuiltin('node:module') // true
114
115
* @example
115
116
* isBuiltin('node:test/reporters') // true
116
117
* @example
117
118
* isBuiltin('test') // false
118
119
*
119
120
* @param {unknown} m
120
- * The URL or module name to check
121
+ * The thing to check
121
122
* @return {boolean}
122
- * `true` if `name ` references builtin module, `false` otherwise
123
+ * `true` if `m ` references builtin module, `false` otherwise
123
124
*/
124
125
function isBuiltin(m : unknown ): boolean {
125
126
return BUILTIN_MODULES .has (String (m ))
You can’t perform that action at this time.
0 commit comments