Merge pull request #23 from Farbdose/patch-1

printing primitive arrays in opts in one line
This commit is contained in:
AJ ONeal 2016-02-17 09:43:57 -07:00
commit 16e458c561
1 changed files with 6 additions and 1 deletions

View File

@ -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; }