mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2025-11-04 05:52:47 +00:00 
			
		
		
		
	printing primitive arrays in opts in one line
This fixes #22 and prints all arrays that contain only primitive values in one line like the key or cert buffer
This commit is contained in:
		
							parent
							
								
									e6e38f3ada
								
							
						
					
					
						commit
						d81a2d0919
					
				@ -19,8 +19,13 @@ module.exports.create = function (opts) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (!opts) { throw new Error("requires opts to be an object"); }
 | 
					  if (!opts) { throw new Error("requires opts to be an object"); }
 | 
				
			||||||
  if (opts.debug) {
 | 
					  if (opts.debug) {
 | 
				
			||||||
    console.debug("[LEX] creating sniCallback", JSON.stringify(opts, null, '  '));
 | 
					    console.debug("[LEX] creating sniCallback", JSON.stringify(opts, function(k,v){
 | 
				
			||||||
 | 
					      if(v instanceof Array)
 | 
				
			||||||
 | 
					         return JSON.stringify(v);
 | 
				
			||||||
 | 
					      return v;
 | 
				
			||||||
 | 
					    },'  '));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  if (!opts.letsencrypt) { throw new Error("requires opts.letsencrypt to be a letsencrypt instance"); }
 | 
					  if (!opts.letsencrypt) { throw new Error("requires opts.letsencrypt to be a letsencrypt instance"); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!opts.lifetime) { opts.lifetime = 90 * 24 * 60 * 60 * 1000; }
 | 
					  if (!opts.lifetime) { opts.lifetime = 90 * 24 * 60 * 60 * 1000; }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user