diff options
author | Rich Trott <rtrott@gmail.com> | 2020-08-22 19:41:19 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-08-25 16:58:25 +0300 |
commit | ad2c22df61be67db5764e7e72d02d8351663bcee (patch) | |
tree | edf97783938001fd518596d7ca7e381dd3aa281a /doc/api/esm.md | |
parent | a8db32a5042782c5426e229f466ba80bf5995c9d (diff) |
doc: use "previous"/"preceding" instead of "above" as modifier
Refs: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/above
PR-URL: https://github.com/nodejs/node/pull/34877
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/esm.md')
-rw-r--r-- | doc/api/esm.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/esm.md b/doc/api/esm.md index 302f234c038..2a4d374dde4 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -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 ``` @@ -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 @@ -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. @@ -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', }; |