Skip to content

Commit

Permalink
doc: fix links in module.md
Browse files Browse the repository at this point in the history
PR-URL: #56283
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
aduh95 authored Dec 19, 2024
1 parent 7560778 commit 0675e05
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions doc/api/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,13 +1159,13 @@ validating the import attributes.
The final value of `format` must be one of the following:
| `format` | Description | Acceptable types for `source` returned by `load` |
| ------------ | ------------------------------ | -------------------------------------------------------------------------- |
| `'builtin'` | Load a Node.js builtin module | Not applicable |
| `'commonjs'` | Load a Node.js CommonJS module | { [`string`][], [`ArrayBuffer`][], [`TypedArray`][], `null`, `undefined` } |
| `'json'` | Load a JSON file | { [`string`][], [`ArrayBuffer`][], [`TypedArray`][] } |
| `'module'` | Load an ES module | { [`string`][], [`ArrayBuffer`][], [`TypedArray`][] } |
| `'wasm'` | Load a WebAssembly module | { [`ArrayBuffer`][], [`TypedArray`][] } |
| `format` | Description | Acceptable types for `source` returned by `load` |
| ------------ | ------------------------------ | -------------------------------------------------- |
| `'builtin'` | Load a Node.js builtin module | {null} |
| `'commonjs'` | Load a Node.js CommonJS module | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
| `'json'` | Load a JSON file | {string\|ArrayBuffer\|TypedArray} |
| `'module'` | Load an ES module | {string\|ArrayBuffer\|TypedArray} |
| `'wasm'` | Load a WebAssembly module | {ArrayBuffer\|TypedArray} |
The value of `source` is ignored for type `'builtin'` because currently it is
not possible to replace the value of a Node.js builtin (core) module.
Expand Down Expand Up @@ -1222,8 +1222,8 @@ of module format.
> These types all correspond to classes defined in ECMAScript.
* The specific [`ArrayBuffer`][] object is a [`SharedArrayBuffer`][].
* The specific [`TypedArray`][] object is a [`Uint8Array`][].
* The specific {ArrayBuffer} object is a {SharedArrayBuffer}.
* The specific {TypedArray} object is a {Uint8Array}.
If the source value of a text-based format (i.e., `'json'`, `'module'`)
is not a string, it is converted to a string using [`util.TextDecoder`][].
Expand Down Expand Up @@ -1702,14 +1702,10 @@ returned object contains the following keys:
[`--enable-source-maps`]: cli.md#--enable-source-maps
[`--import`]: cli.md#--importmodule
[`--require`]: cli.md#-r---require-module
[`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
[`NODE_COMPILE_CACHE=dir`]: cli.md#node_compile_cachedir
[`NODE_DISABLE_COMPILE_CACHE=1`]: cli.md#node_disable_compile_cache1
[`NODE_V8_COVERAGE=dir`]: cli.md#node_v8_coveragedir
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
[`SourceMap`]: #class-modulesourcemap
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
[`initialize`]: #initialize
[`module.constants.compileCacheStatus`]: #moduleconstantscompilecachestatus
[`module.enableCompileCache()`]: #moduleenablecompilecachecachedir
Expand All @@ -1719,7 +1715,6 @@ returned object contains the following keys:
[`os.tmpdir()`]: os.md#ostmpdir
[`registerHooks`]: #moduleregisterhooksoptions
[`register`]: #moduleregisterspecifier-parenturl-options
[`string`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
[`util.TextDecoder`]: util.md#class-utiltextdecoder
[chain]: #chaining
[hooks]: #customization-hooks
Expand Down

0 comments on commit 0675e05

Please sign in to comment.