mirror of
				https://github.com/crazy-max/ghaction-upx.git
				synced 2025-11-04 04:58:11 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			356 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			356 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
var sortKeys = require('sort-keys');
 | 
						|
 | 
						|
/**
 | 
						|
 * Sort object keys by length
 | 
						|
 *
 | 
						|
 * @param obj
 | 
						|
 * @api public
 | 
						|
 */
 | 
						|
 | 
						|
module.exports.desc = function (obj) {
 | 
						|
	return sortKeys(obj, function (a, b) {
 | 
						|
		return b.length - a.length;
 | 
						|
	});
 | 
						|
}
 | 
						|
 | 
						|
module.exports.asc = function (obj) {
 | 
						|
	return sortKeys(obj, function (a, b) {
 | 
						|
		return a.length - b.length;
 | 
						|
	});
 | 
						|
}
 |