Skip to content

Commit

Permalink
doc: use consistent plural form of "index"
Browse files Browse the repository at this point in the history
Our documentation uses both "indices" and "indexes" as the plural form
of "index". The Microsoft Style Guide, which we've adopted for
documentation, says to use "indexes" so let's standardize on that.

Ref: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/i/index-indexes-indices
PR-URL: #52373
Refs: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/i/index-indexes-indices
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
Trott authored Apr 7, 2024
1 parent 47c934e commit 756acd0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ added: v1.1.0

* Returns: {Iterator}

Creates and returns an [iterator][] of `buf` keys (indices).
Creates and returns an [iterator][] of `buf` keys (indexes).

```mjs
import { Buffer } from 'node:buffer';
Expand Down Expand Up @@ -3343,7 +3343,7 @@ added: v3.0.0
* Returns: {Buffer}

Returns a new `Buffer` that references the same memory as the original, but
offset and cropped by the `start` and `end` indices.
offset and cropped by the `start` and `end` indexes.

Specifying `end` greater than [`buf.length`][] will return the same result as
that of `end` equal to [`buf.length`][].
Expand Down Expand Up @@ -3470,7 +3470,7 @@ changes:
> Stability: 0 - Deprecated: Use [`buf.subarray`][] instead.
Returns a new `Buffer` that references the same memory as the original, but
offset and cropped by the `start` and `end` indices.
offset and cropped by the `start` and `end` indexes.

This method is not compatible with the `Uint8Array.prototype.slice()`,
which is a superclass of `Buffer`. To copy the slice, use
Expand Down
4 changes: 2 additions & 2 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ added: v8.6.0
* `multicastInterface` {string}

_All references to scope in this section are referring to
[IPv6 Zone Indices][], which are defined by [RFC 4007][]. In string form, an IP
[IPv6 Zone Indexes][], which are defined by [RFC 4007][]. In string form, an IP
with a scope index is written as `'IP%scope'` where scope is an interface name
or interface number._

Expand Down Expand Up @@ -988,7 +988,7 @@ interfaces" address on a random port (it does the right thing for both `udp4`
and `udp6` sockets). The bound address and port can be retrieved using
[`socket.address().address`][] and [`socket.address().port`][].

[IPv6 Zone Indices]: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
[IPv6 Zone Indexes]: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
[RFC 4007]: https://tools.ietf.org/html/rfc4007
[`'close'`]: #event-close
[`ERR_SOCKET_BAD_PORT`]: errors.md#err_socket_bad_port
Expand Down
2 changes: 1 addition & 1 deletion doc/api/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Throughout the documentation are indications of a section's stability. Some APIs
are so proven and so relied upon that they are unlikely to ever change at all.
Others are brand new and experimental, or known to be hazardous.

The stability indices are as follows:
The stability indexes are as follows:

> Stability: 0 - Deprecated. The feature may emit warnings. Backward
> compatibility is not guaranteed.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ myEmitter.emit('event');
```

Because listeners are managed using an internal array, calling this will
change the position indices of any listener registered _after_ the listener
change the position indexes of any listener registered _after_ the listener
being removed. This will not impact the order in which listeners are called,
but it means that any copies of the listener array as returned by
the `emitter.listeners()` method will need to be recreated.
Expand Down
4 changes: 2 additions & 2 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2218,9 +2218,9 @@ typedef enum {
} napi_key_conversion;
```

`napi_key_numbers_to_strings` will convert integer indices to
`napi_key_numbers_to_strings` will convert integer indexes to
strings. `napi_key_keep_numbers` will return numbers for integer
indices.
indexes.

#### `napi_valuetype`

Expand Down

0 comments on commit 756acd0

Please sign in to comment.