Skip to content

Commit 78d4e52

Browse files
dario-piotrowicztargos
authored andcommitted
doc: fix wrong articles used to address modules
PR-URL: #57090 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent ed5671f commit 78d4e52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/modules.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ This property is experimental and can change in the future. It should only be us
248248
by tools converting ES modules into CommonJS modules, following existing ecosystem
249249
conventions. Code authored directly in CommonJS should avoid depending on it.
250250

251-
When a ES Module contains both named exports and a default export, the result returned by `require()`
251+
When an ES Module contains both named exports and a default export, the result returned by `require()`
252252
is the module namespace object, which places the default export in the `.default` property, similar to
253253
the results returned by `import()`.
254254
To customize what should be returned by `require(esm)` directly, the ES Module can export the
@@ -368,7 +368,7 @@ LOAD_AS_FILE(X)
368368
1. MAYBE_DETECT_AND_LOAD(X.js)
369369
c. If the SCOPE/package.json contains "type" field,
370370
1. If the "type" field is "module", load X.js as an ECMAScript module. STOP.
371-
2. If the "type" field is "commonjs", load X.js as an CommonJS module. STOP.
371+
2. If the "type" field is "commonjs", load X.js as a CommonJS module. STOP.
372372
d. MAYBE_DETECT_AND_LOAD(X.js)
373373
3. If X.json is a file, load X.json to a JavaScript Object. STOP
374374
4. If X.node is a file, load X.node as binary addon. STOP
@@ -379,7 +379,7 @@ LOAD_INDEX(X)
379379
b. If no scope was found, load X/index.js as a CommonJS module. STOP.
380380
c. If the SCOPE/package.json contains "type" field,
381381
1. If the "type" field is "module", load X/index.js as an ECMAScript module. STOP.
382-
2. Else, load X/index.js as an CommonJS module. STOP.
382+
2. Else, load X/index.js as a CommonJS module. STOP.
383383
2. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP
384384
3. If X/index.node is a file, load X/index.node as binary addon. STOP
385385

0 commit comments

Comments
 (0)