summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2019-11-09 14:03:49 +0200
committerKamat, Trivikram <16024985+trivikr@users.noreply.github.com>2019-11-12 16:55:27 -0800
commit3d926898db50699e081a8ce077e212339fde082c (patch)
tree1c5a472e533b7c5814ac7365171cf691412ef8cc /doc/api
parent796f3d0af49164314868c4778af90eca356f1fef (diff)
downloadandroid-node-v8-3d926898db50699e081a8ce077e212339fde082c.tar.gz
android-node-v8-3d926898db50699e081a8ce077e212339fde082c.tar.bz2
android-node-v8-3d926898db50699e081a8ce077e212339fde082c.zip
doc: fix some recent doc nits
* Fix formatting. * Fix list numbering. * Unify abbreviation casing. * Use an uppercased constructor in a hypothetic code example. * Fix typos. * Fix sorting in sections and references. PR-URL: https://github.com/nodejs/node/pull/30341 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/cli.md10
-rw-r--r--doc/api/esm.md8
-rw-r--r--doc/api/modules.md14
3 files changed, 16 insertions, 16 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md
index f415e24611..e88b16b1ea 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -168,9 +168,9 @@ The default is `explicit`, which requires providing the full path to a
module. The `node` mode will enable support for optional file extensions and
the ability to import a directory that has an index file.
-Please see [customizing esm specifier resolution][] for example usage.
+Please see [customizing ESM specifier resolution][] for example usage.
-### `--experimental-conditional-exports
+### `--experimental-conditional-exports`
<!-- YAML
added: REPLACEME
-->
@@ -1321,17 +1321,17 @@ greater than `4` (its current default value). For more information, see the
[`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version
[`unhandledRejection`]: process.html#process_event_unhandledrejection
[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
+[Conditional Exports]: esm.html#esm_conditional_exports
[REPL]: repl.html
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
[Source Map]: https://sourcemaps.info/spec.html
[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
-[customizing esm specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm
+[context-aware]: addons.html#addons_context_aware_addons
+[customizing ESM specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm
[debugger]: debugger.html
[debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor
[experimental ECMAScript Module loader]: esm.html#esm_resolve_hook
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html
[remote code execution]: https://www.owasp.org/index.php/Code_Injection
-[context-aware]: addons.html#addons_context_aware_addons
-[Conditional Exports]: esm.html#esm_conditional_exports
diff --git a/doc/api/esm.md b/doc/api/esm.md
index bba2d0ee9c..086f359f5d 100644
--- a/doc/api/esm.md
+++ b/doc/api/esm.md
@@ -622,9 +622,9 @@ CommonJS and ES module instances of the package:
package, it would be used like this:
```js
- import date from 'date';
- const someDate = new date();
- // someDate contains state; date does not
+ import Date from 'date';
+ const someDate = new Date();
+ // someDate contains state; Date does not
```
The `new` keyword isn’t required; a package’s function can return a new
@@ -1217,7 +1217,7 @@ _defaultEnv_ is the conditional environment name priority array,
> 1. Throw a _Module Not Found_ error.
> 1. If _pjson.exports_ is not **null** or **undefined**, then
> 1. If _exports_ is an Object with both a key starting with _"."_ and a key
-> not starting with _"."_, throw a "Invalid Package Configuration" error.
+> not starting with _"."_, throw an "Invalid Package Configuration" error.
> 1. If _pjson.exports_ is a String or Array, or an Object containing no
> keys starting with _"."_, then
> 1. Return **PACKAGE_EXPORTS_TARGET_RESOLVE**(_packageURL_,
diff --git a/doc/api/modules.md b/doc/api/modules.md
index d685662921..ff7191e462 100644
--- a/doc/api/modules.md
+++ b/doc/api/modules.md
@@ -234,15 +234,15 @@ RESOLVE_BARE_SPECIFIER(DIR, X)
b. If "exports" is null or undefined, GOTO 3.
c. If "exports" is an object with some keys starting with "." and some keys
not starting with ".", throw "invalid config".
- c. If "exports" is a string, or object with no keys starting with ".", treat
+ d. If "exports" is a string, or object with no keys starting with ".", treat
it as having that value as its "." object property.
- d. If subpath is "." and "exports" does not have a "." entry, GOTO 3.
- e. Find the longest key in "exports" that the subpath starts with.
- f. If no such key can be found, throw "not found".
- g. let RESOLVED_URL =
+ e. If subpath is "." and "exports" does not have a "." entry, GOTO 3.
+ f. Find the longest key in "exports" that the subpath starts with.
+ g. If no such key can be found, throw "not found".
+ h. let RESOLVED_URL =
PACKAGE_EXPORTS_TARGET_RESOLVE(pathToFileURL(DIR/name), exports[key],
- subpath.slice(key.length)), as defined in the esm resolver.
- h. return fileURLToPath(RESOLVED_URL)
+ subpath.slice(key.length)), as defined in the ESM resolver.
+ i. return fileURLToPath(RESOLVED_URL)
3. return DIR/X
```