(value, index)
| 19322 | } |
| 19323 | |
| 19324 | function objectValue(value, index) { |
| 19325 | // If `valueOf` is a valid function use that |
| 19326 | if (typeof value.valueOf === 'function') { |
| 19327 | value = value.valueOf(); |
| 19328 | if (isPrimitive(value)) return value; |
| 19329 | } |
| 19330 | // If `toString` is a valid function and not the one from `Object.prototype` use that |
| 19331 | if (hasCustomToString(value)) { |
| 19332 | value = value.toString(); |
| 19333 | if (isPrimitive(value)) return value; |
| 19334 | } |
| 19335 | // We have a basic object so we use the position of the object in the collection |
| 19336 | return index; |
| 19337 | } |
| 19338 | |
| 19339 | function getPredicateValue(value, index) { |
| 19340 | var type = typeof value; |
no test coverage detected