MCPcopy Create free account
hub / github.com/apache/cloudstack / compare

Function compare

tools/ngui/static/js/lib/angular.js:10447–10458  ·  view source on GitHub ↗
(v1, v2)

Source from the content-addressed store, hash-verified

10445 : comp;
10446 }
10447 function compare(v1, v2){
10448 var t1 = typeof v1;
10449 var t2 = typeof v2;
10450 if (t1 == t2) {
10451 if (t1 == "string") v1 = v1.toLowerCase();
10452 if (t1 == "string") v2 = v2.toLowerCase();
10453 if (v1 === v2) return 0;
10454 return v1 < v2 ? -1 : 1;
10455 } else {
10456 return t1 < t2 ? -1 : 1;
10457 }
10458 }
10459 }
10460}
10461

Callers 1

orderByFilterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected