Skip to content

Commit 2c3dc56

Browse files
dario-piotrowiczmarco-ippolito
authored andcommitted
doc: fix wrong articles used to address modules
PR-URL: #57090 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent cd8259c commit 2c3dc56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/modules.md

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

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

0 commit comments

Comments
 (0)