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

Function objectValue

test/angular/1.5/angular.js:22101–22114  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

22099 }
22100
22101 function objectValue(value) {
22102 // If `valueOf` is a valid function use that
22103 if (isFunction(value.valueOf)) {
22104 value = value.valueOf();
22105 if (isPrimitive(value)) return value;
22106 }
22107 // If `toString` is a valid function and not the one from `Object.prototype` use that
22108 if (hasCustomToString(value)) {
22109 value = value.toString();
22110 if (isPrimitive(value)) return value;
22111 }
22112
22113 return value;
22114 }
22115
22116 function getPredicateValue(value, index) {
22117 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