MCPcopy
hub / github.com/angular-ui/ui-router / objectValue

Function objectValue

test/angular/1.7/angular.js:23903–23916  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

23901 }
23902
23903 function objectValue(value) {
23904 // If `valueOf` is a valid function use that
23905 if (isFunction(value.valueOf)) {
23906 value = value.valueOf();
23907 if (isPrimitive(value)) return value;
23908 }
23909 // If `toString` is a valid function and not the one from `Object.prototype` use that
23910 if (hasCustomToString(value)) {
23911 value = value.toString();
23912 if (isPrimitive(value)) return value;
23913 }
23914
23915 return value;
23916 }
23917
23918 function getPredicateValue(value, index) {
23919 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