1 | /**
|
2 | Check if a string matches the name of a Node.js builtin module.
|
3 |
|
4 | This matches based a [static list of modules](https://github.com/sindresorhus/builtin-modules) from the latest Node.js version. If you want to check for a module in the current Node.js, use the core [`isBuiltin`](https://nodejs.org/api/module.html#moduleisbuiltinmodulename) method.
|
5 |
|
6 | @param moduleName - The name of the module.
|
7 |
|
8 | @example
|
9 | ```
|
10 | import isBuiltinModule from 'is-builtin-module';
|
11 |
|
12 | isBuiltinModule('fs/promises');
|
13 | //=> true
|
14 |
|
15 | isBuiltinModule('node:fs');
|
16 | //=> true
|
17 |
|
18 | isBuiltinModule('unicorn');
|
19 | //=> false
|
20 | ```
|
21 | */
|
22 | export default function isBuiltinModule(moduleName: string): boolean;
|