Comparing version 3.3.6 to 3.3.7
{ | ||
"name": "clues", | ||
"version": "3.3.6", | ||
"version": "3.3.7", | ||
"description": "Lightweight logic tree solver using promises.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -7,3 +7,3 @@ var clues = require('../clues'), | ||
function stringify(obj,pretty) { | ||
function stringify(obj,pretty,debug) { | ||
var cache = []; | ||
@@ -15,5 +15,5 @@ | ||
if (typeof value === 'function' || value.length && typeof value[value.length-1] === 'function') | ||
return '[Function]'; | ||
return debug ? '[Function]' : undefined; | ||
if (typeof value.then === 'function' || value.isFulfilled !== undefined) | ||
return (!value.private) ? '[Promise]' : undefined; | ||
return (!value.private && debug) ? '[Promise]' : undefined; | ||
@@ -45,3 +45,3 @@ if (typeof value === 'object') { | ||
err.message = 'Internal Error'; | ||
delete e.stack; | ||
delete err.stack; | ||
} | ||
@@ -98,3 +98,3 @@ return err; | ||
if (options.single) { | ||
_res.send(d.error ? 500 : 200, stringify(d,pretty)+'\n'); | ||
_res.send(d.error ? 500 : 200, stringify(d,pretty,options.debug)+'\n'); | ||
_res.write = noop; | ||
@@ -109,3 +109,3 @@ _res.end = noop; | ||
txt[ref] = d; | ||
txt = first+stringify(txt,pretty); | ||
txt = first+stringify(txt,pretty,options.debug); | ||
first = ''; | ||
@@ -112,0 +112,0 @@ _res.write(txt.slice(1,txt.length-1)+',\t\n'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96463