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

Function getComparisonObject

lib/test/angular/1.8.0/angular.js:23909–23920  ·  view source on GitHub ↗
(value, index)

Source from the content-addressed store, hash-verified

23907 return array;
23908
23909 function getComparisonObject(value, index) {
23910 // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
23911 // This will be used to keep the sort stable when none of the input predicates can
23912 // distinguish between two elements.
23913 return {
23914 value: value,
23915 tieBreaker: {value: index, type: 'number', index: index},
23916 predicateValues: predicates.map(function(predicate) {
23917 return getPredicateValue(predicate.get(value), index);
23918 })
23919 };
23920 }
23921
23922 function doComparison(v1, v2) {
23923 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