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

Function getComparisonObject

test/angular/1.6/angular.js:23006–23017  ·  view source on GitHub ↗
(value, index)

Source from the content-addressed store, hash-verified

23004 return array;
23005
23006 function getComparisonObject(value, index) {
23007 // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
23008 // This will be used to keep the sort stable when none of the input predicates can
23009 // distinguish between two elements.
23010 return {
23011 value: value,
23012 tieBreaker: {value: index, type: 'number', index: index},
23013 predicateValues: predicates.map(function(predicate) {
23014 return getPredicateValue(predicate.get(value), index);
23015 })
23016 };
23017 }
23018
23019 function doComparison(v1, v2) {
23020 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