Skip to content

Commit c7e33fe

Browse files
committed
doc: replace '~' with '$HOME', refactor
1 parent 263ad12 commit c7e33fe

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/api/modules.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ LOAD_NODE_MODULES(X, START)
183183
NODE_MODULES_PATHS(START)
184184
1. let PARTS = path split(START)
185185
2. let I = count of PARTS - 1
186-
3. let DIRS = [GLOBAL_FOLDERS](#modules_loading_from_the_global_folders)
186+
3. let DIRS = [GLOBAL_FOLDERS]
187187
4. while I >= 0,
188188
a. if PARTS[I] = "node_modules" CONTINUE
189189
b. DIR = path join(PARTS[0 .. I] + "node_modules")
@@ -650,10 +650,10 @@ changes:
650650
* `options` {Object}
651651
* `paths` {string[]} Paths to resolve module location from. If present, these
652652
paths are used instead of the default resolution paths, with the exception
653-
of [GLOBAL_FOLDERS](#modules_loading_from_the_global_folders) like
654-
`~/.node_modules`, which are always included. Note that each of these paths
655-
is used as a starting point for the module resolution algorithm, meaning
656-
that the `node_modules` hierarchy is checked from this location.
653+
of [GLOBAL_FOLDERS][] like `$HOME/.node_modules`, which are always
654+
included. Note that each of these paths is used as a starting point for
655+
the module resolution algorithm, meaning that the `node_modules` hierarchy
656+
is checked from this location.
657657
* Returns: {string}
658658

659659
Use the internal `require()` machinery to look up the location of a module,
@@ -897,3 +897,4 @@ const builtin = require('module').builtinModules;
897897
[module resolution]: #modules_all_together
898898
[module wrapper]: #modules_the_module_wrapper
899899
[native addons]: addons.html
900+
[GLOBAL_FOLDERS]: #modules_loading_from_the_global_folders

0 commit comments

Comments
 (0)