mirror of
				https://github.com/taixingyiji/openit.git
				synced 2025-11-04 04:32:24 +00:00 
			
		
		
		
	2022.07.20 16:18:09 更新订阅
This commit is contained in:
		
							
								
								
									
										41
									
								
								utils/rm/node_modules/lodash/_compareAscending.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								utils/rm/node_modules/lodash/_compareAscending.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
var isSymbol = require('./isSymbol');
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Compares values to sort them in ascending order.
 | 
			
		||||
 *
 | 
			
		||||
 * @private
 | 
			
		||||
 * @param {*} value The value to compare.
 | 
			
		||||
 * @param {*} other The other value to compare.
 | 
			
		||||
 * @returns {number} Returns the sort order indicator for `value`.
 | 
			
		||||
 */
 | 
			
		||||
function compareAscending(value, other) {
 | 
			
		||||
  if (value !== other) {
 | 
			
		||||
    var valIsDefined = value !== undefined,
 | 
			
		||||
        valIsNull = value === null,
 | 
			
		||||
        valIsReflexive = value === value,
 | 
			
		||||
        valIsSymbol = isSymbol(value);
 | 
			
		||||
 | 
			
		||||
    var othIsDefined = other !== undefined,
 | 
			
		||||
        othIsNull = other === null,
 | 
			
		||||
        othIsReflexive = other === other,
 | 
			
		||||
        othIsSymbol = isSymbol(other);
 | 
			
		||||
 | 
			
		||||
    if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
 | 
			
		||||
        (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
 | 
			
		||||
        (valIsNull && othIsDefined && othIsReflexive) ||
 | 
			
		||||
        (!valIsDefined && othIsReflexive) ||
 | 
			
		||||
        !valIsReflexive) {
 | 
			
		||||
      return 1;
 | 
			
		||||
    }
 | 
			
		||||
    if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
 | 
			
		||||
        (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
 | 
			
		||||
        (othIsNull && valIsDefined && valIsReflexive) ||
 | 
			
		||||
        (!othIsDefined && valIsReflexive) ||
 | 
			
		||||
        !othIsReflexive) {
 | 
			
		||||
      return -1;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = compareAscending;
 | 
			
		||||
		Reference in New Issue
	
	Block a user