From 3be9821b5ff3590a13cdbf735df79edaac369d60 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:57:30 +0100 Subject: [PATCH] docs(collection): add articles --- packages/collection/src/collection.ts | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/collection/src/collection.ts b/packages/collection/src/collection.ts index 0547ebb81006..5644085ca35d 100644 --- a/packages/collection/src/collection.ts +++ b/packages/collection/src/collection.ts @@ -221,8 +221,8 @@ export class Collection extends Map { * should use the `get` method. See * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details. * - * @param fn - The function to test with (should return boolean) - * @param thisArg - Value to use as `this` when executing function + * @param fn - The function to test with (should return a boolean) + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.find(user => user.username === 'Bob'); @@ -250,8 +250,8 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()}, * but returns the key rather than the positional index. * - * @param fn - The function to test with (should return boolean) - * @param thisArg - Value to use as `this` when executing function + * @param fn - The function to test with (should return a boolean) + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.findKey(user => user.username === 'Bob'); @@ -278,7 +278,7 @@ export class Collection extends Map { * Removes items that satisfy the provided filter function. * * @param fn - Function used to test (should return a boolean) - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @returns The number of removed entries */ public sweep(fn: (value: V, key: K, collection: this) => unknown): number; @@ -299,8 +299,8 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()}, * but returns a Collection instead of an Array. * - * @param fn - The function to test with (should return boolean) - * @param thisArg - Value to use as `this` when executing function + * @param fn - The function to test with (should return a boolean) + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.filter(user => user.username === 'Bob'); @@ -334,7 +334,7 @@ export class Collection extends Map { * contains the items that passed and the second contains the items that failed. * * @param fn - Function used to test (should return a boolean) - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * const [big, small] = collection.partition(guild => guild.memberCount > 250); @@ -385,7 +385,7 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}. * * @param fn - Function that produces a new Collection - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.flatMap(guild => guild.members.cache); @@ -407,7 +407,7 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}. * * @param fn - Function that produces an element of the new array, taking three arguments - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.map(user => user.tag); @@ -430,7 +430,7 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}. * * @param fn - Function that produces an element of the new collection, taking three arguments - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.mapValues(user => user.tag); @@ -451,7 +451,7 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}. * * @param fn - Function used to test (should return a boolean) - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.some(user => user.discriminator === '0000'); @@ -474,7 +474,7 @@ export class Collection extends Map { * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}. * * @param fn - Function used to test (should return a boolean) - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection.every(user => !user.bot); @@ -539,7 +539,7 @@ export class Collection extends Map { * but returns the collection instead of undefined. * * @param fn - Function to execute for each element - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection @@ -565,7 +565,7 @@ export class Collection extends Map { * Runs a function on the collection and returns the collection. * * @param fn - Function to execute - * @param thisArg - Value to use as `this` when executing function + * @param thisArg - Value to use as `this` when executing the function * @example * ```ts * collection