mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 08:41:29 +00:00
docs(Collection): clarify example for tap method (#2881)
* docs: clarify example for Collection#tap * docs: wording improvement
This commit is contained in:
parent
6e5f088e44
commit
78c4be52c6
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue