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

Function getComparisonObject

test/angular/1.5/angular.js:22042–22053  ·  view source on GitHub ↗
(value, index)

Source from the content-addressed store, hash-verified

22040 return array;
22041
22042 function getComparisonObject(value, index) {
22043 // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
22044 // This will be used to keep the sort stable when none of the input predicates can
22045 // distinguish between two elements.
22046 return {
22047 value: value,
22048 tieBreaker: {value: index, type: 'number', index: index},
22049 predicateValues: predicates.map(function(predicate) {
22050 return getPredicateValue(predicate.get(value), index);
22051 })
22052 };
22053 }
22054
22055 function doComparison(v1, v2) {
22056 for (var i = 0, ii = predicates.length; i < ii; i++) {

Callers

nothing calls this directly

Calls 1

getPredicateValueFunction · 0.70

Tested by

no test coverage detected