Skip to content

Commit 403a648

Browse files
jkremstargos
authored andcommitted
doc: fix numbering in require algorithm
Refs: #29327 PR-URL: #30117 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 98c8f76 commit 403a648

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/modules.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ require(X) from module at path Y
159159
3. If X begins with './' or '/' or '../'
160160
a. LOAD_AS_FILE(Y + X)
161161
b. LOAD_AS_DIRECTORY(Y + X)
162-
5. LOAD_NODE_MODULES(X, dirname(Y))
163-
4. LOAD_SELF_REFERENCE(X, dirname(Y))
162+
4. LOAD_NODE_MODULES(X, dirname(Y))
163+
5. LOAD_SELF_REFERENCE(X, dirname(Y))
164164
6. THROW "not found"
165165
166166
LOAD_AS_FILE(X)
@@ -222,8 +222,8 @@ LOAD_NODE_MODULES(X, START)
222222
1. let DIRS = NODE_MODULES_PATHS(START)
223223
2. for each DIR in DIRS:
224224
a. let FILE_PATH = RESOLVE_BARE_SPECIFIER(DIR, X)
225-
a. LOAD_AS_FILE(FILE_PATH)
226-
b. LOAD_AS_DIRECTORY(FILE_PATH)
225+
b. LOAD_AS_FILE(FILE_PATH)
226+
c. LOAD_AS_DIRECTORY(FILE_PATH)
227227
228228
RESOLVE_BARE_SPECIFIER(DIR, X)
229229
1. Try to interpret X as a combination of name and subpath where the name

0 commit comments

Comments
 (0)