(value, index)
| 19467 | } |
| 19468 | |
| 19469 | function objectValue(value, index) { |
| 19470 | // If `valueOf` is a valid function use that |
| 19471 | if (typeof value.valueOf === 'function') { |
| 19472 | value = value.valueOf(); |
| 19473 | if (isPrimitive(value)) return value; |
| 19474 | } |
| 19475 | // If `toString` is a valid function and not the one from `Object.prototype` use that |
| 19476 | if (hasCustomToString(value)) { |
| 19477 | value = value.toString(); |
| 19478 | if (isPrimitive(value)) return value; |
| 19479 | } |
| 19480 | // We have a basic object so we use the position of the object in the collection |
| 19481 | return index; |
| 19482 | } |
| 19483 | |
| 19484 | function getPredicateValue(value, index) { |
| 19485 | var type = typeof value; |
no test coverage detected