Browse Source

doc: added X.json to the LOAD_AS_FILE sudo code

Signed-off-by: Fedor Indutny <fedor@indutny.com>
v0.10.30-release
Maurice Butler 11 years ago
committed by Fedor Indutny
parent
commit
71fc4d9486
  1. 3
      doc/api/modules.markdown

3
doc/api/modules.markdown

@ -385,7 +385,8 @@ in pseudocode of what require.resolve does:
LOAD_AS_FILE(X) LOAD_AS_FILE(X)
1. If X is a file, load X as JavaScript text. STOP 1. If X is a file, load X as JavaScript text. STOP
2. If X.js is a file, load X.js as JavaScript text. STOP 2. If X.js is a file, load X.js as JavaScript text. STOP
3. If X.node is a file, load X.node as binary addon. STOP 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_AS_DIRECTORY(X) LOAD_AS_DIRECTORY(X)
1. If X/package.json is a file, 1. If X/package.json is a file,

Loading…
Cancel
Save