Skip to content

Commit a674989

Browse files
authoredOct 4, 2023
docs(collection): Minor article additions (#9868)
docs(collection): add articles
1 parent cd987b5 commit a674989

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed
 

‎packages/collection/src/collection.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ export class Collection<K, V> extends Map<K, V> {
221221
* should use the `get` method. See
222222
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.
223223
*
224-
* @param fn - The function to test with (should return boolean)
225-
* @param thisArg - Value to use as `this` when executing function
224+
* @param fn - The function to test with (should return a boolean)
225+
* @param thisArg - Value to use as `this` when executing the function
226226
* @example
227227
* ```ts
228228
* collection.find(user => user.username === 'Bob');
@@ -250,8 +250,8 @@ export class Collection<K, V> extends Map<K, V> {
250250
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},
251251
* but returns the key rather than the positional index.
252252
*
253-
* @param fn - The function to test with (should return boolean)
254-
* @param thisArg - Value to use as `this` when executing function
253+
* @param fn - The function to test with (should return a boolean)
254+
* @param thisArg - Value to use as `this` when executing the function
255255
* @example
256256
* ```ts
257257
* collection.findKey(user => user.username === 'Bob');
@@ -278,7 +278,7 @@ export class Collection<K, V> extends Map<K, V> {
278278
* Removes items that satisfy the provided filter function.
279279
*
280280
* @param fn - Function used to test (should return a boolean)
281-
* @param thisArg - Value to use as `this` when executing function
281+
* @param thisArg - Value to use as `this` when executing the function
282282
* @returns The number of removed entries
283283
*/
284284
public sweep(fn: (value: V, key: K, collection: this) => unknown): number;
@@ -299,8 +299,8 @@ export class Collection<K, V> extends Map<K, V> {
299299
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},
300300
* but returns a Collection instead of an Array.
301301
*
302-
* @param fn - The function to test with (should return boolean)
303-
* @param thisArg - Value to use as `this` when executing function
302+
* @param fn - The function to test with (should return a boolean)
303+
* @param thisArg - Value to use as `this` when executing the function
304304
* @example
305305
* ```ts
306306
* collection.filter(user => user.username === 'Bob');
@@ -334,7 +334,7 @@ export class Collection<K, V> extends Map<K, V> {
334334
* contains the items that passed and the second contains the items that failed.
335335
*
336336
* @param fn - Function used to test (should return a boolean)
337-
* @param thisArg - Value to use as `this` when executing function
337+
* @param thisArg - Value to use as `this` when executing the function
338338
* @example
339339
* ```ts
340340
* const [big, small] = collection.partition(guild => guild.memberCount > 250);
@@ -385,7 +385,7 @@ export class Collection<K, V> extends Map<K, V> {
385385
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.
386386
*
387387
* @param fn - Function that produces a new Collection
388-
* @param thisArg - Value to use as `this` when executing function
388+
* @param thisArg - Value to use as `this` when executing the function
389389
* @example
390390
* ```ts
391391
* collection.flatMap(guild => guild.members.cache);
@@ -407,7 +407,7 @@ export class Collection<K, V> extends Map<K, V> {
407407
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.
408408
*
409409
* @param fn - Function that produces an element of the new array, taking three arguments
410-
* @param thisArg - Value to use as `this` when executing function
410+
* @param thisArg - Value to use as `this` when executing the function
411411
* @example
412412
* ```ts
413413
* collection.map(user => user.tag);
@@ -430,7 +430,7 @@ export class Collection<K, V> extends Map<K, V> {
430430
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.
431431
*
432432
* @param fn - Function that produces an element of the new collection, taking three arguments
433-
* @param thisArg - Value to use as `this` when executing function
433+
* @param thisArg - Value to use as `this` when executing the function
434434
* @example
435435
* ```ts
436436
* collection.mapValues(user => user.tag);
@@ -451,7 +451,7 @@ export class Collection<K, V> extends Map<K, V> {
451451
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.
452452
*
453453
* @param fn - Function used to test (should return a boolean)
454-
* @param thisArg - Value to use as `this` when executing function
454+
* @param thisArg - Value to use as `this` when executing the function
455455
* @example
456456
* ```ts
457457
* collection.some(user => user.discriminator === '0000');
@@ -474,7 +474,7 @@ export class Collection<K, V> extends Map<K, V> {
474474
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.
475475
*
476476
* @param fn - Function used to test (should return a boolean)
477-
* @param thisArg - Value to use as `this` when executing function
477+
* @param thisArg - Value to use as `this` when executing the function
478478
* @example
479479
* ```ts
480480
* collection.every(user => !user.bot);
@@ -539,7 +539,7 @@ export class Collection<K, V> extends Map<K, V> {
539539
* but returns the collection instead of undefined.
540540
*
541541
* @param fn - Function to execute for each element
542-
* @param thisArg - Value to use as `this` when executing function
542+
* @param thisArg - Value to use as `this` when executing the function
543543
* @example
544544
* ```ts
545545
* collection
@@ -565,7 +565,7 @@ export class Collection<K, V> extends Map<K, V> {
565565
* Runs a function on the collection and returns the collection.
566566
*
567567
* @param fn - Function to execute
568-
* @param thisArg - Value to use as `this` when executing function
568+
* @param thisArg - Value to use as `this` when executing the function
569569
* @example
570570
* ```ts
571571
* collection

0 commit comments

Comments
 (0)
Please sign in to comment.