mirror of
				https://github.com/flynx/features.js.git
				synced 2025-10-30 02:40:11 +00:00 
			
		
		
		
	added numan-readablr priority getter...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									fe73561b5d
								
							
						
					
					
						commit
						ea917bd6f1
					
				
							
								
								
									
										11
									
								
								features.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								features.js
									
									
									
									
									
								
							| @ -103,11 +103,18 @@ module.FeatureProto = { | |||||||
| 
 | 
 | ||||||
| 	isApplicable: function(actions){ return true }, | 	isApplicable: function(actions){ return true }, | ||||||
| 
 | 
 | ||||||
| 	getPriority: function(){ | 	getPriority: function(human_readable){ | ||||||
| 		var res = this.priority || 0 | 		var res = this.priority || 0 | ||||||
| 		return res == 'high' ? 99 | 		res = res == 'high' ? 99 | ||||||
| 			: res == 'low' ? -99 | 			: res == 'low' ? -99 | ||||||
| 			: res == 'medium' ? 0 | 			: res == 'medium' ? 0 | ||||||
|  | 			: res == 'normal' ? 0 | ||||||
|  | 			: res | ||||||
|  | 		return human_readable ? | ||||||
|  | 				(res == 99 ? 'high' | ||||||
|  | 					: res == 0 ? 'normal' | ||||||
|  | 					: res == -99 ? 'low' | ||||||
|  | 					: res) | ||||||
| 			: res | 			: res | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "ig-features", |   "name": "ig-features", | ||||||
|   "version": "3.2.4", |   "version": "3.2.5", | ||||||
|   "description": "", |   "description": "", | ||||||
|   "main": "features.js", |   "main": "features.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user