Skip to content

doc: use "previous"/"preceding" instead of "above" as modifier #34877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ until the root of the volume is reached.
```

```bash
# In same folder as above package.json
# In same folder as preceding package.json
node my-app.js # Runs as ES module
```

Expand Down Expand Up @@ -542,7 +542,7 @@ import { something } from 'a-package'; // Imports "something" from ./main.mjs.

Self-referencing is available only if `package.json` has `exports`, and will
allow importing only what that `exports` (in the `package.json`) allows.
So the code below, given the package above, will generate a runtime error:
So the code below, given the previous package, will generate a runtime error:

```js
// ./another-module.mjs
Expand Down Expand Up @@ -689,7 +689,7 @@ CommonJS entry point for `require`.
}
```

The above example uses explicit extensions `.mjs` and `.cjs`.
The preceding example uses explicit extensions `.mjs` and `.cjs`.
If your files use the `.js` extension, `"type": "module"` will cause such files
to be treated as ES modules, just as `"type": "commonjs"` would cause them
to be treated as CommonJS.
Expand Down Expand Up @@ -1309,7 +1309,7 @@ export async function getFormat(url, context, defaultGetFormat) {
if (Math.random() > 0.5) { // Some condition.
// For some or all URLs, do some custom logic for determining format.
// Always return an object of the form {format: <string>}, where the
// format is one of the strings in the table above.
// format is one of the strings in the preceding table.
return {
format: 'module',
};
Expand Down