Skip to content

Commit bfd4c78

Browse files
Trottmarco-ippolito
authored andcommittedMay 3, 2024
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: #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 7508d48 commit bfd4c78

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
@@ -2222,7 +2222,7 @@ added: v1.1.0
22222222

22232223
* Returns: {Iterator}
22242224

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

22272227
```mjs
22282228
import { Buffer } from 'node:buffer';
@@ -3341,7 +3341,7 @@ added: v3.0.0
33413341
* Returns: {Buffer}
33423342

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

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

34733473
This method is not compatible with the `Uint8Array.prototype.slice()`,
34743474
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
@@ -739,7 +739,7 @@ added: v8.6.0
739739
* `multicastInterface` {string}
740740

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

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

989-
[IPv6 Zone Indices]: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
989+
[IPv6 Zone Indexes]: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
990990
[RFC 4007]: https://tools.ietf.org/html/rfc4007
991991
[`'close'`]: #event-close
992992
[`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
@@ -960,7 +960,7 @@ myEmitter.emit('event');
960960
```
961961

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

‎doc/api/n-api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2215,9 +2215,9 @@ typedef enum {
22152215
} napi_key_conversion;
22162216
```
22172217

2218-
`napi_key_numbers_to_strings` will convert integer indices to
2218+
`napi_key_numbers_to_strings` will convert integer indexes to
22192219
strings. `napi_key_keep_numbers` will return numbers for integer
2220-
indices.
2220+
indexes.
22212221

22222222
#### `napi_valuetype`
22232223

0 commit comments

Comments
 (0)
Please sign in to comment.