docs(Collection): clarify example for tap method (#2881)

* docs: clarify example for Collection#tap

* docs: wording improvement
This commit is contained in:
Souji
2018-10-10 10:29:53 +02:00
committed by SpaceEEC
parent 6e5f088e44
commit 78c4be52c6

View File

@@ -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);