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

Function getComparisonObject

test/angular/1.7/angular.js:23844–23855  ·  view source on GitHub ↗
(value, index)

Source from the content-addressed store, hash-verified

23842 return array;
23843
23844 function getComparisonObject(value, index) {
23845 // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
23846 // This will be used to keep the sort stable when none of the input predicates can
23847 // distinguish between two elements.
23848 return {
23849 value: value,
23850 tieBreaker: {value: index, type: 'number', index: index},
23851 predicateValues: predicates.map(function(predicate) {
23852 return getPredicateValue(predicate.get(value), index);
23853 })
23854 };
23855 }
23856
23857 function doComparison(v1, v2) {
23858 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