summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Bedford <guybedford@gmail.com>2020-05-13 20:37:22 -0700
committerGitHub <noreply@github.com>2020-05-13 20:37:22 -0700
commit0dde62d7ac567340cddaa5a521c42fe091d36b96 (patch)
tree3b9729a3da921e06b8148c1f501d4199a9d7e5f6
parenteaa16cd477f671804a46b57bfdfe918a02334f4d (diff)
downloadnode-new-self-resolve-doc.tar.gz
docs: CommonJS self-resolve spec correctionself-resolve-doc
-rw-r--r--doc/api/modules.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/api/modules.md b/doc/api/modules.md
index aec88a936b..4a649cb859 100644
--- a/doc/api/modules.md
+++ b/doc/api/modules.md
@@ -208,9 +208,9 @@ LOAD_SELF_REFERENCE(X, START)
1. Find the closest package scope to START.
2. If no scope was found, return.
3. If the `package.json` has no "exports", return.
-4. If the name in `package.json` isn't a prefix of X, throw "not found".
-5. Otherwise, load the remainder of X relative to this package as if it
- was loaded via `LOAD_NODE_MODULES` with a name in `package.json`.
+4. If the name in `package.json` is a prefix of X, then
+ a. Load the remainder of X relative to this package as if it was
+ loaded via `LOAD_NODE_MODULES` with a name in `package.json`.
LOAD_PACKAGE_EXPORTS(DIR, X)
1. Try to interpret X as a combination of name and subpath where the name