compare (v, w) Numberpublic
Defined in packages/ember-runtime/lib/compare.js:40
Compares two javascript values and returns: -1 if the first is smaller than the second, 0 if both are equal, 1 if the first is greater than the second. Ember.compare('hello', 'hello'); // 0
Ember.compare('abc', 'dfg'); // -1
Ember.compare(2, 1); // 1
If the types of the two objects are different precedence occurs in the following order, with types earlier in the list considered < types