(value, index)
| 20005 | } |
| 20006 | |
| 20007 | function objectValue(value, index) { |
| 20008 | // If `valueOf` is a valid function use that |
| 20009 | if (typeof value.valueOf === 'function') { |
| 20010 | value = value.valueOf(); |
| 20011 | if (isPrimitive(value)) return value; |
| 20012 | } |
| 20013 | // If `toString` is a valid function and not the one from `Object.prototype` use that |
| 20014 | if (hasCustomToString(value)) { |
| 20015 | value = value.toString(); |
| 20016 | if (isPrimitive(value)) return value; |
| 20017 | } |
| 20018 | // We have a basic object so we use the position of the object in the collection |
| 20019 | return index; |
| 20020 | } |
| 20021 | |
| 20022 | function getPredicateValue(value, index) { |
| 20023 | var type = typeof value; |
no test coverage detected