diff --git a/doc/api/modules.md b/doc/api/modules.md index 973ee7ee8e03c5..a0c669f20956e8 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -161,14 +161,18 @@ LOAD_AS_FILE(X) 3. If X.json is a file, parse X.json to a JavaScript Object. STOP 4. If X.node is a file, load X.node as binary addon. STOP +LOAD_INDEX(X) +1. If X/index.js is a file, load X/index.js as JavaScript text. STOP +2. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP +3. If X/index.node is a file, load X/index.node as binary addon. STOP + LOAD_AS_DIRECTORY(X) 1. If X/package.json is a file, a. Parse X/package.json, and look for "main" field. b. let M = X + (json main field) c. LOAD_AS_FILE(M) -2. If X/index.js is a file, load X/index.js as JavaScript text. STOP -3. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP -4. If X/index.node is a file, load X/index.node as binary addon. STOP + d. LOAD_INDEX(M) +2. LOAD_INDEX(X) LOAD_NODE_MODULES(X, START) 1. let DIRS=NODE_MODULES_PATHS(START)