Comparing version 3.5.11 to 3.5.12
{ | ||
"name": "clues", | ||
"version": "3.5.11", | ||
"version": "3.5.12", | ||
"description": "Lightweight logic tree solver using promises.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -42,3 +42,3 @@ var clues = require('../clues'), | ||
function stringifyError(e) { | ||
function stringifyError(e,debug) { | ||
var err = {error: true}; | ||
@@ -54,3 +54,3 @@ Object.getOwnPropertyNames(e) | ||
if (!options.debug) { | ||
if (!debug) { | ||
err = { | ||
@@ -120,4 +120,3 @@ error : true, | ||
function emit_property(ref,d) { | ||
var debug = options.debug !== undefined ? options.debug : $global.reptileDebug; | ||
function emit_property(ref,d,debug) { | ||
var txt = {}; | ||
@@ -136,7 +135,12 @@ txt[ref] = d; | ||
.map(function(ref) { | ||
var debug; | ||
if (ref === '' && options.debug) ref = facts; | ||
return clues(facts,ref,$global,'__user__') | ||
.catch(stringifyError) | ||
.finally(function() { | ||
debug = options.debug !== undefined ? options.debug : $global.reptileDebug; | ||
}) | ||
.catch(function(e) { | ||
return stringifyError(e,debug); | ||
}) | ||
.then(function(d) { | ||
var debug = options.debug !== undefined ? options.debug : $global.reptileDebug; | ||
if (options.single) { | ||
@@ -152,3 +156,3 @@ _res.status(d.error ? (d.status||400) : 200) | ||
emit_property(ref,d); | ||
emit_property(ref,d,debug); | ||
}); | ||
@@ -155,0 +159,0 @@ }); |
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
88049
1691