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.1.6 to 3.2.0

4

clues.js

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

fn = Object.getPrototypeOf(logic)[ref];
else if ($global[ref])
else if ($global[ref] && caller && caller !== '__user__')
return clues($global,ref,$global,caller,fullref);

@@ -102,3 +102,3 @@ else if (logic && logic.$property && typeof logic.$property === 'function')

return res || clues(logic,arg,$global,ref,fullref)
return res || clues(logic,arg,$global,ref || 'fn',fullref)
.then(null,function(e) {

@@ -105,0 +105,0 @@ if (optional) return (showError) ? e : undefined;

{
"name": "clues",
"version": "3.1.6",
"version": "3.2.0",
"description": "Lightweight logic tree solver using promises.",

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

@@ -58,3 +58,12 @@ var clues = require('../clues'),

it('should be applied inside a function',function() {
it('can not be applied directly',function() {
return clues(facts,'$input',global)
.then(function() {
throw 'Should Error';
},function(e) {
assert.equal(e.message,'$input not defined');
});
});
it('can not be applied as part of dot notation',function() {
return clues(facts,'d.c',global)

@@ -61,0 +70,0 @@ .then(function(d) {

@@ -30,3 +30,3 @@ var clues = require('../clues'),

it ('should return a function',function() {
clues(Object.create(logic),'$logic_service',Object.create(global))
return clues(Object.create(logic),'$logic_service',Object.create(global))
.then(function($logic_service) {

@@ -42,3 +42,3 @@ assert.equal(typeof $logic_service,'function');

it ('should return a function',function() {
clues(Object.create(logic),'top.$nested_service',Object.create(global))
return clues(Object.create(logic),'top.$nested_service',Object.create(global))
.then(function($nested_service) {

@@ -53,7 +53,6 @@ assert.equal(typeof $nested_service,'function');

it('should return a function',function() {
clues(Object.create(logic),'$global_service',Object.create(global))
.then(function($logic_service) {
return clues(Object.create(logic),function($logic_service) {
assert.equal(typeof $logic_service,'function');
assert.equal($logic_service(20),20);
});
},Object.create(global));
});

@@ -60,0 +59,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