File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Universal drop-in replacement for [`module.builtinModules`][1]
1818- [ Install] ( #install )
1919- [ Use] ( #use )
2020- [ API] ( #api )
21+ - [ ` builtinModules ` ] ( #builtinmodules )
2122- [ Types] ( #types )
2223- [ Related] ( #related )
2324- [ Contribute] ( #contribute )
@@ -28,8 +29,8 @@ This package is a universal drop-in replacement for the [`builtinModules`][1] co
2829
2930## When should I use this?
3031
31- This package exports an array containing all modules provided by Node.js. It can be used to not only verify a Node.js
32- module, but to also determine if a module can be imported using the [ ` node: ` ] [ 3 ] protocol .
32+ This package exports an array containing the names of modules provided by Node.js. It can be used to not only verify
33+ that a module is maintained by Node.js , but to also determine if a module can be imported using a [ ` node: ` URL ] [ 3 ] .
3334
3435## Install
3536
@@ -58,7 +59,20 @@ yarn add @flex-development/builtin-modules@flex-development/builtin-modules
5859
5960## API
6061
61- ** TODO** : api documentation.
62+ This package exports the identifier ` builtinModules ` .
63+
64+ There is no default export.
65+
66+ ### ` builtinModules `
67+
68+ An array containing the names of modules provided by Node.js.
69+
70+ The array is a ** superset** of [ ` module.builtinModules ` ] [ 1 ] given the running version of Node.js.
71+
72+ Possible use cases:
73+
74+ - Check if a module can be imported using a [ ` node: ` URL] [ 3 ]
75+ - Check if a module is maintained by Node.js
6276
6377## Types
6478
Original file line number Diff line number Diff line change 44 */
55
66/**
7- * Names of modules provided by Node.js.
7+ * Array containing the names of modules provided by Node.js.
8+ *
9+ * The array is a **superset** of [`module.builtinModules`][1] given the running
10+ * version of Node.js.
811 *
912 * Possible use cases:
1013 *
11- * - Check if a module can be imported using the [`node:`][1] protocol
14+ * - Check if a module can be imported using a [`node:` URL][2]
1215 * - Check if a module is maintained by Node.js
1316 *
14- * [1]: https://nodejs.org/api/esm.html#node-imports
17+ * [1]: https://nodejs.org/api/module.html#modulebuiltinmodules
18+ * [2]: https://nodejs.org/api/esm.html#node-imports
1519 *
1620 * @const {string[]} builtinModules
1721 */
You can’t perform that action at this time.
0 commit comments