1 | # builtin-modules
|
2 |
|
3 | > A static list of the Node.js builtin modules from the latest Node.js version
|
4 |
|
5 | The list is just a [JSON file](builtin-modules.json) and can be used anywhere.
|
6 |
|
7 | ## Install
|
8 |
|
9 | ```sh
|
10 | npm install builtin-modules
|
11 | ```
|
12 |
|
13 | ## Usage
|
14 |
|
15 | ```js
|
16 | import builtinModules from 'builtin-modules';
|
17 |
|
18 | console.log(builtinModules);
|
19 | //=> ['assert', 'buffer', …]
|
20 | ```
|
21 |
|
22 | ## Tip
|
23 |
|
24 | To get a list from the current Node.js version, use the built-in API:
|
25 |
|
26 | ```js
|
27 | import {builtinModules} from 'node:module';
|
28 | ```
|
29 |
|
30 | ## Related
|
31 |
|
32 | - [is-builtin-module](https://github.com/sindresorhus/is-builtin-module) - Check if a string matches the name of a Node.js builtin module
|