mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-11-04 05:50:10 +00:00 
			
		
		
		
	Merge pull request #10 from mmalecki/none-mode
Add none mode, which doesn't change string
This commit is contained in:
		
						commit
						5f945f0da4
					
				@ -107,8 +107,10 @@ function stylize(str, style) {
 | 
				
			|||||||
      'red'       : ['<span style="color:red;">',     '</span>'],
 | 
					      'red'       : ['<span style="color:red;">',     '</span>'],
 | 
				
			||||||
      'yellow'    : ['<span style="color:yellow;">',  '</span>']
 | 
					      'yellow'    : ['<span style="color:yellow;">',  '</span>']
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					  } else if (exports.mode == 'none') {
 | 
				
			||||||
 | 
					      return str;
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    console.log('unsupported mode, try "browser" or "console"');
 | 
					    console.log('unsupported mode, try "browser", "console" or "none"');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return styles[style][0] + str + styles[style][1];
 | 
					  return styles[style][0] + str + styles[style][1];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user