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

Function getComparisonObject

lib/test/angular/1.6.7/angular.js:22679–22690  ·  view source on GitHub ↗
(value, index)

Source from the content-addressed store, hash-verified

22677 return array;
22678
22679 function getComparisonObject(value, index) {
22680 // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
22681 // This will be used to keep the sort stable when none of the input predicates can
22682 // distinguish between two elements.
22683 return {
22684 value: value,
22685 tieBreaker: {value: index, type: 'number', index: index},
22686 predicateValues: predicates.map(function(predicate) {
22687 return getPredicateValue(predicate.get(value), index);
22688 })
22689 };
22690 }
22691
22692 function doComparison(v1, v2) {
22693 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