Skip to content

Commit 756acd0

Browse files
authored
doc: use consistent plural form of "index"
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: nodejs#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>
1 parent 47c934e commit 756acd0

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

doc/api/buffer.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ added: v1.1.0
22242224

22252225
* Returns: {Iterator}
22262226

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

22292229
```mjs
22302230
import { Buffer } from 'node:buffer';
@@ -3343,7 +3343,7 @@ added: v3.0.0
33433343
* Returns: {Buffer}
33443344

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

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

34753475
This method is not compatible with the `Uint8Array.prototype.slice()`,
34763476
which is a superclass of `Buffer`. To copy the slice, use

doc/api/dgram.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ added: v8.6.0
741741
* `multicastInterface` {string}
742742

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

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

991-
[IPv6 Zone Indices]: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
991+
[IPv6 Zone Indexes]: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
992992
[RFC 4007]: https://tools.ietf.org/html/rfc4007
993993
[`'close'`]: #event-close
994994
[`ERR_SOCKET_BAD_PORT`]: errors.md#err_socket_bad_port

doc/api/documentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Throughout the documentation are indications of a section's stability. Some APIs
2121
are so proven and so relied upon that they are unlikely to ever change at all.
2222
Others are brand new and experimental, or known to be hazardous.
2323

24-
The stability indices are as follows:
24+
The stability indexes are as follows:
2525

2626
> Stability: 0 - Deprecated. The feature may emit warnings. Backward
2727
> compatibility is not guaranteed.

doc/api/events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ myEmitter.emit('event');
962962
```
963963

964964
Because listeners are managed using an internal array, calling this will
965-
change the position indices of any listener registered _after_ the listener
965+
change the position indexes of any listener registered _after_ the listener
966966
being removed. This will not impact the order in which listeners are called,
967967
but it means that any copies of the listener array as returned by
968968
the `emitter.listeners()` method will need to be recreated.

doc/api/n-api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2218,9 +2218,9 @@ typedef enum {
22182218
} napi_key_conversion;
22192219
```
22202220

2221-
`napi_key_numbers_to_strings` will convert integer indices to
2221+
`napi_key_numbers_to_strings` will convert integer indexes to
22222222
strings. `napi_key_keep_numbers` will return numbers for integer
2223-
indices.
2223+
indexes.
22242224

22252225
#### `napi_valuetype`
22262226

0 commit comments

Comments
 (0)