MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / objectValue

Function objectValue

lib/test/angular/1.7.0/angular.js:23182–23195  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

23180 }
23181
23182 function objectValue(value) {
23183 // If `valueOf` is a valid function use that
23184 if (isFunction(value.valueOf)) {
23185 value = value.valueOf();
23186 if (isPrimitive(value)) return value;
23187 }
23188 // If `toString` is a valid function and not the one from `Object.prototype` use that
23189 if (hasCustomToString(value)) {
23190 value = value.toString();
23191 if (isPrimitive(value)) return value;
23192 }
23193
23194 return value;
23195 }
23196
23197 function getPredicateValue(value, index) {
23198 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