mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	Add edge case handling for undefined styles
This commit is contained in:
		
							parent
							
								
									7f146faff3
								
							
						
					
					
						commit
						a8ce90c51c
					
				| @ -13,6 +13,4 @@ node_js: | |||||||
|   - "0.8" |   - "0.8" | ||||||
| script: | script: | ||||||
|   - npm install |   - npm install | ||||||
|   - npm install if-node-version |  | ||||||
|   - if-node-version ">=4" "./node_modules/.bin/eslint . " |  | ||||||
|   - npm test |   - npm test | ||||||
|  | |||||||
| @ -105,7 +105,7 @@ 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) { | ||||||
|     if (arg.constructor === String) { |     if (arg !== undefined && arg.constructor === String) { | ||||||
|       return arg; |       return arg; | ||||||
|     } else { |     } else { | ||||||
|       return util.inspect(arg); |       return util.inspect(arg); | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| { | { | ||||||
|     "name": "colors", |     "name": "colors", | ||||||
|     "description": "get colors in your node.js console", |     "description": "get colors in your node.js console", | ||||||
|     "version": "1.2.4", |     "version": "1.2.5", | ||||||
|     "author": "Marak Squires", |     "author": "Marak Squires", | ||||||
|     "homepage": "https://github.com/Marak/colors.js", |     "homepage": "https://github.com/Marak/colors.js", | ||||||
|     "bugs": "https://github.com/Marak/colors.js/issues", |     "bugs": "https://github.com/Marak/colors.js/issues", | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user