Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

clues

Package Overview
Dependencies
Maintainers
2
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clues - npm Package Compare versions

Comparing version 3.5.5 to 3.5.6

2

clues.js

@@ -129,3 +129,3 @@ (function(self) {

if (e && e.stack && typeof $global.$logError === 'function')
$global.$logError(e);
$global.$logError(e, fullref);
throw e;

@@ -132,0 +132,0 @@ });

{
"name": "clues",
"version": "3.5.5",
"version": "3.5.6",
"description": "Lightweight logic tree solver using promises.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -148,3 +148,3 @@ [![NPM Version][npm-image]][npm-url]

You can provide a function called `$logError` in the `$global` object to record any true javascript errors (with `.stack`) when they occur. For proper logging it is important to capture the error at source, as the dependencies might be optional - in which case the error never reaches the original request.
You can provide a function called `$logError` in the `$global` object to record any true javascript errors (with `.stack`) when they occur. The `$logError` function will be called with the error object as first argument and `fullref` as the second argument. For proper logging it is important to capture the error at source, as the dependencies might be optional - in which case the error never reaches the original request.

@@ -151,0 +151,0 @@ ### making arguments optional with the underscore prefix

@@ -111,7 +111,8 @@ var clues = require('../clues'),

it('should log an error with stack',function() {
var facts = Object.create(logic),error;
return clues(facts,'stack_error',{$logError:function(e) {error = e;}})
var facts = Object.create(logic),error,fullref;
return clues(facts,'stack_error',{$logError:function(e,f) {error = e;fullref = f;}})
.catch(Object)
.then(function() {
assert.equal(error && error.message,'error');
assert.equal(fullref,'stack_error');
});

@@ -121,7 +122,8 @@ });

it('should log a rejected promise with stack',function() {
var facts = Object.create(logic),error;
return clues(facts,'stack_error_promise',{$logError:function(e) {error = e;}})
var facts = Object.create(logic),error,fullref;
return clues(facts,'stack_error_promise',{$logError:function(e,f) {error = e; fullref = f;}})
.catch(Object)
.then(function() {
assert.equal(error && error.message,'error');
assert.equal(fullref,'stack_error_promise');
});

@@ -128,0 +130,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc