(value, index)
| 20483 | } |
| 20484 | |
| 20485 | function objectValue(value, index) { |
| 20486 | // If `valueOf` is a valid function use that |
| 20487 | if (typeof value.valueOf === 'function') { |
| 20488 | value = value.valueOf(); |
| 20489 | if (isPrimitive(value)) return value; |
| 20490 | } |
| 20491 | // If `toString` is a valid function and not the one from `Object.prototype` use that |
| 20492 | if (hasCustomToString(value)) { |
| 20493 | value = value.toString(); |
| 20494 | if (isPrimitive(value)) return value; |
| 20495 | } |
| 20496 | // We have a basic object so we use the position of the object in the collection |
| 20497 | return index; |
| 20498 | } |
| 20499 | |
| 20500 | function getPredicateValue(value, index) { |
| 20501 | var type = typeof value; |
no test coverage detected