Skip to content

Commit b0626e9

Browse files
tniessenitalojs
authored andcommitted
doc: use serial comma in ESM docs
Refs: nodejs#11321 Refs: nodejs#17384 PR-URL: nodejs#43322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
1 parent aa8b1c7 commit b0626e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/esm.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ import './foo.mjs?query=1'; // loads ./foo.mjs with query of "?query=1"
178178
import './foo.mjs?query=2'; // loads ./foo.mjs with query of "?query=2"
179179
```
180180

181-
The volume root may be referenced via `/`, `//` or `file:///`. Given the
181+
The volume root may be referenced via `/`, `//`, or `file:///`. Given the
182182
differences between [URL][] and path resolution (such as percent encoding
183183
details), it is recommended to use [url.pathToFileURL][] when importing a path.
184184

@@ -470,7 +470,7 @@ semantics implemented.
470470
471471
### Differences between ES modules and CommonJS
472472
473-
#### No `require`, `exports` or `module.exports`
473+
#### No `require`, `exports`, or `module.exports`
474474
475475
In most cases, the ES module `import` can be used to load CommonJS modules.
476476
@@ -1085,7 +1085,7 @@ import CoffeeScript from 'coffeescript';
10851085
10861086
const baseURL = pathToFileURL(`${cwd()}/`).href;
10871087
1088-
// CoffeeScript files end in .coffee, .litcoffee or .coffee.md.
1088+
// CoffeeScript files end in .coffee, .litcoffee, or .coffee.md.
10891089
const extensionsRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/;
10901090
10911091
export async function resolve(specifier, context, nextResolve) {
@@ -1251,7 +1251,7 @@ The resolver can throw the following errors:
12511251
> 2. If _specifier_ is a valid URL, then
12521252
> 1. Set _resolved_ to the result of parsing and reserializing
12531253
> _specifier_ as a URL.
1254-
> 3. Otherwise, if _specifier_ starts with _"/"_, _"./"_ or _"../"_, then
1254+
> 3. Otherwise, if _specifier_ starts with _"/"_, _"./"_, or _"../"_, then
12551255
> 1. Set _resolved_ to the URL resolution of _specifier_ relative to
12561256
> _parentURL_.
12571257
> 4. Otherwise, if _specifier_ starts with _"#"_, then
@@ -1432,14 +1432,14 @@ _internal_, _conditions_)
14321432
> 2. Return **PACKAGE\_RESOLVE**(_target_ + _subpath_,
14331433
> _packageURL_ + _"/"_).
14341434
> 2. Otherwise, throw an _Invalid Package Target_ error.
1435-
> 3. If _target_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_ or
1435+
> 3. If _target_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_, or
14361436
> _"node\_modules"_ segments after the first segment, case insensitive and
14371437
> including percent encoded variants, throw an _Invalid Package Target_
14381438
> error.
14391439
> 4. Let _resolvedTarget_ be the URL resolution of the concatenation of
14401440
> _packageURL_ and _target_.
14411441
> 5. Assert: _resolvedTarget_ is contained in _packageURL_.
1442-
> 6. If _subpath_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_ or
1442+
> 6. If _subpath_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_, or
14431443
> _"node\_modules"_ segments, case insensitive and including percent
14441444
> encoded variants, throw an _Invalid Module Specifier_ error.
14451445
> 7. If _pattern_ is **true**, then

0 commit comments

Comments
 (0)