Skip to content

Commit

Permalink
fix: 文档修复
Browse files Browse the repository at this point in the history
  • Loading branch information
h7lin committed Oct 2, 2019
1 parent 16c7ac9 commit 18cfe49
Show file tree
Hide file tree
Showing 27 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion crypto/crypto_timingsafeequal_a_b.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This function is based on a constant-time algorithm.
Returns true if `a` is equal to `b`, without leaking timing information that
would allow an attacker to guess one of the values. This is suitable for
comparing HMAC digests or secret values like authentication cookies or
[capability urls](https://www.w3.org/TR/capability-urls/).
`a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
must have the same length.
Expand Down
2 changes: 1 addition & 1 deletion dns/dnspromises_setservers_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `dnsPromises.setServers()` method must not be called while a DNS query is in
progress.

This method works much like

[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html).
That is, if attempting to resolve with the first server provided results in a
`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with
subsequent servers provided. Fallback DNS servers will only be used if the
Expand Down
4 changes: 2 additions & 2 deletions esm/data_imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
added: v12.10.0
-->


[`data:` URLs][] are supported for importing with the following MIME types:

* `text/javascript` for ES Modules
* `application/json` for JSON
* `application/wasm` for WASM.

`data:` URLs only resolve [_Bare specifiers_][Terminology] for builtin modules
and [_Absolute specifiers_][Terminology]. Resolving

[_Relative specifiers_][Terminology] will not work because `data:` is not a
[special scheme][]. For example, attempting to load `./foo`
from `data:text/javascript,import "./foo";` will fail to resolve since there
is no concept of relative resolution for `data:` URLs. An example of a `data:`
Expand Down
2 changes: 1 addition & 1 deletion esm/url_based_paths.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ES modules are resolved and cached based upon

[URL](https://url.spec.whatwg.org/) semantics. This means that files containing
special characters such as `#` and `?` need to be escaped.

Modules will be loaded multiple times if the `import` specifier used to resolve
Expand Down
2 changes: 1 addition & 1 deletion n-api/module_registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ napi_value Init(napi_env env, napi_value exports) {
```

To define a class so that new instances can be created (often used with

[Object Wrap][]):

```C
// NOTE: partial example, not all referenced code is included
Expand Down
4 changes: 2 additions & 2 deletions n-api/n_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The N-API is a C API that ensures ABI stability across Node.js versions
and different compiler levels. A C++ API can be easier to use.
To support using C++, the project maintains a
C++ wrapper module called

[node-addon-api](https://github.com/nodejs/node-addon-api).
This wrapper provides an inlineable C++ API. Binaries built
with `node-addon-api` will depend on the symbols for the N-API C-based
functions exported by Node.js. `node-addon-api` is a more
Expand Down Expand Up @@ -77,6 +77,6 @@ The end result is that the addon only uses the exported C APIs. As a result,
it still gets the benefits of the ABI stability provided by the C API.
When using `node-addon-api` instead of the C APIs, start with the API
[docs](https://github.com/nodejs/node-addon-api#api-documentation)
for `node-addon-api`.

2 changes: 1 addition & 1 deletion n-api/napi_coerce_to_bool.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ napi_status napi_coerce_to_bool(napi_env env,
Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToBoolean()` as defined in

[Section 7.1.2](https://tc39.github.io/ecma262/#sec-toboolean)
of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.

2 changes: 1 addition & 1 deletion n-api/napi_coerce_to_number.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ napi_status napi_coerce_to_number(napi_env env,
Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToNumber()` as defined in

[Section 7.1.3](https://tc39.github.io/ecma262/#sec-tonumber)
of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.

2 changes: 1 addition & 1 deletion n-api/napi_coerce_to_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ napi_status napi_coerce_to_object(napi_env env,
Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToObject()` as defined in

[Section 7.1.13](https://tc39.github.io/ecma262/#sec-toobject)
of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.

2 changes: 1 addition & 1 deletion n-api/napi_coerce_to_string.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ napi_status napi_coerce_to_string(napi_env env,
Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToString()` as defined in

[Section 7.1.13](https://tc39.github.io/ecma262/#sec-tostring)
of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.

2 changes: 1 addition & 1 deletion n-api/napi_create_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ be associated with the resulting JavaScript function (which is returned in the
passing both the JavaScript function and the data to [`napi_add_finalizer`][].
JavaScript `Function`s are described in

[Section 19.2](https://tc39.github.io/ecma262/#sec-function-objects)
of the ECMAScript Language Specification.

4 changes: 2 additions & 2 deletions n-api/napi_create_int64.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The JavaScript `Number` type is described in [Section 6.1.6][]
of the ECMAScript Language Specification. Note the complete range of `int64_t`
cannot be represented with full precision in JavaScript. Integer values
outside the range of

[`Number.MIN_SAFE_INTEGER`](https://tc39.github.io/ecma262/#sec-number.min_safe_integer)
-(2^53 - 1) -

[`Number.MAX_SAFE_INTEGER`](https://tc39.github.io/ecma262/#sec-number.max_safe_integer)
(2^53 - 1) will lose precision.

2 changes: 1 addition & 1 deletion n-api/napi_create_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ This API allocates a default JavaScript `Object`.
It is the equivalent of doing `new Object()` in JavaScript.

The JavaScript `Object` type is described in

[Section 6.1.7](https://tc39.github.io/ecma262/#sec-object-type) of the
ECMAScript Language Specification.

2 changes: 1 addition & 1 deletion n-api/napi_create_symbol.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Returns `napi_ok` if the API succeeded.
This API creates a JavaScript `Symbol` object from a UTF8-encoded C string.

The JavaScript `Symbol` type is described in

[Section 19.4](https://tc39.github.io/ecma262/#sec-symbol-objects)
of the ECMAScript Language Specification.

2 changes: 1 addition & 1 deletion n-api/napi_get_array_length.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Returns `napi_ok` if the API succeeded.
This API returns the length of an array.

`Array` length is described in

[Section 22.1.4.1](https://tc39.github.io/ecma262/#sec-properties-of-array-instances-length)
of the ECMAScript Language Specification.

4 changes: 2 additions & 2 deletions n-api/napi_get_value_int64.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This API returns the C `int64` primitive equivalent of the given JavaScript
`Number`.

`Number` values outside the range of
[`Number.MIN_SAFE_INTEGER`](https://tc39.github.io/ecma262/#sec-number.min_safe_integer)
-(2^53 - 1) -
[`Number.MAX_SAFE_INTEGER`](https://tc39.github.io/ecma262/#sec-number.max_safe_integer)
(2^53 - 1) will lose precision.
Non-finite number values (`NaN`, `+Infinity`, or `-Infinity`) set the
Expand Down
2 changes: 1 addition & 1 deletion n-api/napi_instanceof.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Returns `napi_ok` if the API succeeded.

This API represents invoking the `instanceof` Operator on the object as
defined in

[Section 12.10.4](https://tc39.github.io/ecma262/#sec-instanceofoperator)
of the ECMAScript Language Specification.

2 changes: 1 addition & 1 deletion n-api/napi_strict_equals.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Returns `napi_ok` if the API succeeded.

This API represents the invocation of the Strict Equality algorithm as
defined in

[Section 7.2.14](https://tc39.github.io/ecma262/#sec-strict-equality-comparison)
of the ECMAScript Language Specification.

2 changes: 1 addition & 1 deletion n-api/napi_valuetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ typedef enum {

Describes the type of a `napi_value`. This generally corresponds to the types
described in

[Section 6.1](https://tc39.github.io/ecma262/#sec-ecmascript-language-types) of
the ECMAScript Language Specification.
In addition to types in that section, `napi_valuetype` can also represent
`Function`s and `Object`s with external data.
Expand Down
2 changes: 1 addition & 1 deletion n-api/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

In order to use the N-API functions, include the file

[`node_api.h`](https://github.com/nodejs/node/blob/master/src/node_api.h)
which is located in the src directory in the node development tree:

```C
Expand Down
2 changes: 1 addition & 1 deletion n-api/working_with_javascript_properties.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

N-API exposes a set of APIs to get and set properties on JavaScript
objects. Some of these types are documented under

[Section 7](https://tc39.github.io/ecma262/#sec-operations-on-objects) of the
[ECMAScript Language Specification][].

Properties in JavaScript are represented as a tuple of a key and a value.
Expand Down
2 changes: 1 addition & 1 deletion n-api/working_with_javascript_values.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
N-API exposes a set of APIs to create all types of JavaScript values.
Some of these types are documented under

[Section 6](https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values)
of the [ECMAScript Language Specification][].

Fundamentally, these APIs are used to do one of the following:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

N-API exposes a set of APIs to perform some abstract operations on JavaScript
values. Some of these operations are documented under

[Section 7](https://tc39.github.io/ecma262/#sec-abstract-operations)
of the [ECMAScript Language Specification][].

These APIs support doing one of the following:
Expand Down
2 changes: 1 addition & 1 deletion policy/integrity_checks.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Policy files must use integrity checks with Subresource Integrity strings
compatible with the browser

[integrity attribute](https://www.w3.org/TR/SRI/#the-integrity-attribute)
associated with absolute URLs.

When using `require()` all resources involved in loading are checked for
Expand Down
2 changes: 1 addition & 1 deletion stream/compatibility_with_older_node_js_versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Prior to Node.js 0.10, the incoming message data would be simply discarded.
However, in Node.js 0.10 and beyond, the socket remains paused forever.

The workaround in this situation is to call the

[`stream.resume()`][stream-resume] method to begin the flow of data:

```js
// Workaround.
Expand Down
2 changes: 1 addition & 1 deletion tls/tlssocket_getcipher.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Returns an object containing information on the negotiated cipher suite.
For example: `{ name: 'AES256-SHA', version: 'TLSv1.2' }`.

See

[SSL_CIPHER_get_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html)
for more information.

2 changes: 1 addition & 1 deletion tls/tlssocket_getsharedsigalgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ added: v12.11.0
the client in the order of decreasing preference.

See

[SSL_get_shared_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html)
for more information.

0 comments on commit 18cfe49

Please sign in to comment.