MCPcopy Index your code
hub / github.com/angular-ui/ui-router / objectValue

Function objectValue

test/angular/1.6/angular.js:23065–23078  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

23063 }
23064
23065 function objectValue(value) {
23066 // If `valueOf` is a valid function use that
23067 if (isFunction(value.valueOf)) {
23068 value = value.valueOf();
23069 if (isPrimitive(value)) return value;
23070 }
23071 // If `toString` is a valid function and not the one from `Object.prototype` use that
23072 if (hasCustomToString(value)) {
23073 value = value.toString();
23074 if (isPrimitive(value)) return value;
23075 }
23076
23077 return value;
23078 }
23079
23080 function getPredicateValue(value, index) {
23081 var type = typeof value;

Callers 1

getPredicateValueFunction · 0.70

Calls 3

isFunctionFunction · 0.70
isPrimitiveFunction · 0.70
hasCustomToStringFunction · 0.70

Tested by

no test coverage detected