mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	replace ternary with if/else
This commit is contained in:
		
							parent
							
								
									32906a23ad
								
							
						
					
					
						commit
						7f146faff3
					
				| @ -105,7 +105,11 @@ function applyStyle() { | |||||||
|   var args = Array.prototype.slice.call(arguments); |   var args = Array.prototype.slice.call(arguments); | ||||||
| 
 | 
 | ||||||
|   var str = args.map(function(arg) { |   var str = args.map(function(arg) { | ||||||
|     return arg.constructor === String ? arg : util.inspect(arg); |     if (arg.constructor === String) { | ||||||
|  |       return arg; | ||||||
|  |     } else { | ||||||
|  |       return util.inspect(arg); | ||||||
|  |     } | ||||||
|   }).join(' '); |   }).join(' '); | ||||||
| 
 | 
 | ||||||
|   if (!colors.enabled || !str) { |   if (!colors.enabled || !str) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user