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

Function compare

test/angular/1.2/angular.js:15788–15805  ·  view source on GitHub ↗
(v1, v2)

Source from the content-addressed store, hash-verified

15786 : comp;
15787 }
15788 function compare(v1, v2){
15789 var t1 = typeof v1;
15790 var t2 = typeof v2;
15791 if (t1 == t2) {
15792 if (isDate(v1) && isDate(v2)) {
15793 v1 = v1.valueOf();
15794 v2 = v2.valueOf();
15795 }
15796 if (t1 == "string") {
15797 v1 = v1.toLowerCase();
15798 v2 = v2.toLowerCase();
15799 }
15800 if (v1 === v2) return 0;
15801 return v1 < v2 ? -1 : 1;
15802 } else {
15803 return t1 < t2 ? -1 : 1;
15804 }
15805 }
15806 };
15807}
15808

Callers 2

nodeLinkFnFunction · 0.70
orderByFilterFunction · 0.70

Calls 1

isDateFunction · 0.70

Tested by

no test coverage detected