Skip to content

Commit 02c7dc1

Browse files
committed
docs: update usage example
Signed-off-by: Lexus Drumgold <[email protected]>
1 parent 718f8db commit 02c7dc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ const builtins: string[] = [
8383
...builtinModules,
8484
'node:sea',
8585
'node:test',
86-
'node:sqlite',
87-
'node:test/reporters'
86+
'node:sqlite'
8887
]
8988

9089
/**
@@ -110,16 +109,18 @@ const BUILTIN_MODULES: Set<string> = new Set(builtins.flatMap(m => {
110109
* @example
111110
* isBuiltin('fs/promises') // true
112111
* @example
112+
* isBuiltin(new URL('node:os')) // true
113+
* @example
113114
* isBuiltin('node:module') // true
114115
* @example
115116
* isBuiltin('node:test/reporters') // true
116117
* @example
117118
* isBuiltin('test') // false
118119
*
119120
* @param {unknown} m
120-
* The URL or module name to check
121+
* The thing to check
121122
* @return {boolean}
122-
* `true` if `name` references builtin module, `false` otherwise
123+
* `true` if `m` references builtin module, `false` otherwise
123124
*/
124125
function isBuiltin(m: unknown): boolean {
125126
return BUILTIN_MODULES.has(String(m))

0 commit comments

Comments
 (0)