mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33: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}
|
* @returns {Collection}
|
||||||
* @example
|
* @example
|
||||||
* collection
|
* collection
|
||||||
* .tap(coll => coll.size)
|
* .tap(coll => console.log(`${coll.size} users, including bots`))
|
||||||
* .filter(user => user.bot)
|
* .filter(user => user.bot)
|
||||||
* .tap(coll => coll.size)
|
* .tap(coll => console.log(`${coll.size} users, excluding bots`))
|
||||||
*/
|
*/
|
||||||
tap(fn, thisArg) {
|
tap(fn, thisArg) {
|
||||||
if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg);
|
if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg);
|
||||||
|
|||||||
Reference in New Issue
Block a user