mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
docs(Collection): clarify example for tap method (#2881)
* docs: clarify example for Collection#tap * docs: wording improvement
This commit is contained in:
@@ -349,9 +349,9 @@ class Collection extends Map {
|
||||
* @returns {Collection}
|
||||
* @example
|
||||
* collection
|
||||
* .tap(coll => coll.size)
|
||||
* .tap(coll => console.log(`${coll.size} users, including bots`))
|
||||
* .filter(user => user.bot)
|
||||
* .tap(coll => coll.size)
|
||||
* .tap(coll => console.log(`${coll.size} users, excluding bots`))
|
||||
*/
|
||||
tap(fn, thisArg) {
|
||||
if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg);
|
||||
|
||||
Reference in New Issue
Block a user