mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	Merge branch 'develop' of github.com:Marak/colors.js into develop
This commit is contained in:
		
						commit
						acb7f66738
					
				| @ -105,8 +105,8 @@ function applyStyle() { | ||||
|   var args = Array.prototype.slice.call(arguments); | ||||
| 
 | ||||
|   var str = args.map(function(arg) { | ||||
|     // Use weak equality check so we can colorize null in safe mode
 | ||||
|     if (arg != undefined && arg.constructor === String) { | ||||
|     // Use weak equality check so we can colorize null/undefined in safe mode
 | ||||
|     if (arg != null && arg.constructor === String) { | ||||
|       return arg; | ||||
|     } else { | ||||
|       return util.inspect(arg); | ||||
|  | ||||
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -1,6 +1,6 @@ | ||||
| { | ||||
|     "name": "colors", | ||||
|     "version": "1.3.3", | ||||
|     "version": "1.3.4", | ||||
|     "lockfileVersion": 1, | ||||
|     "requires": true, | ||||
|     "dependencies": { | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| { | ||||
|     "name": "colors", | ||||
|     "description": "get colors in your node.js console", | ||||
|     "version": "1.3.3", | ||||
|     "version": "1.3.4", | ||||
|     "author": "Marak Squires", | ||||
|     "contributors": [ | ||||
|         { | ||||
|  | ||||
| @ -66,3 +66,10 @@ colors.setTheme({custom: ['red', 'italic', 'inverse']}); | ||||
| assert.equal(colors.custom(s), | ||||
|     '\x1b[7m' + '\x1b[3m' + '\x1b[31m' + s + | ||||
|   '\x1b[39m' + '\x1b[23m' + '\x1b[27m' ); | ||||
| 
 | ||||
| // should not throw error on null or undefined values
 | ||||
| var undef; | ||||
| assert.equal(colors.yellow(undef), '\x1b[33mundefined\x1b[39m'); | ||||
| 
 | ||||
| // was failing:
 | ||||
| assert.equal(colors.red(null), '\x1b[31mnull\x1b[39m'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user