docs(Collection): fix findKey jsdoc (#3204)

This commit is contained in:
izexi
2019-04-14 14:49:32 +01:00
committed by SpaceEEC
parent 923c945b4b
commit 3cd224dc76

View File

@@ -223,8 +223,8 @@ class Collection extends Map {
* @example
* collection.findKey(val => val.username === 'Bob');
*/
/* eslint-enable max-len */
findKey(propOrFn, value) {
/* eslint-enable max-len */
if (typeof propOrFn === 'string') {
if (typeof value === 'undefined') throw new Error('Value must be specified.');
for (const [key, val] of this) {