2 * The base implementation of `compareAscending` which compares values and
3 * sorts them in ascending order without guaranteeing a stable sort.
6 * @param {*} value The value to compare to `other`.
7 * @param {*} other The value to compare to `value`.
8 * @returns {number} Returns the sort order indicator for `value`.
10 function baseCompareAscending(value, other) {
11 if (value !== other) {
12 var valIsReflexive = value === value,
13 othIsReflexive = other === other;
15 if (value > other || !valIsReflexive || (value === undefined && othIsReflexive)) {
18 if (value < other || !othIsReflexive || (other === undefined && valIsReflexive)) {
25 module.exports = baseCompareAscending;