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

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.3.11 to 3.3.13-timing

test/null-logic-test.js

2

bower.json
{
"name": "clues",
"version": "3.3.11",
"version": "3.3.13",
"main": "clues.js",

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

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

var dot = ref.search(/ᐅ|\./);
if (dot > -1 && logic[ref] === undefined) {
if (dot > -1 && (!logic || logic[ref] === undefined)) {
var next = ref.slice(0,dot);

@@ -56,5 +56,5 @@ return clues(logic,next,$global,caller,fullref)

fullref = (fullref ? fullref+'.' : '')+ref;
fn = logic[ref];
fn = logic ? logic[ref] : undefined;
if (fn === undefined) {
if (typeof(logic) === 'object' && Object.getPrototypeOf(logic)[ref] !== undefined)
if (typeof(logic) === 'object' && logic !== null && (Object.getPrototypeOf(logic) || {})[ref] !== undefined)
fn = Object.getPrototypeOf(logic)[ref];

@@ -119,3 +119,3 @@ else if ($global[ref] && caller && caller !== '__user__')

var inputs = clues.Promise.all(args);
var inputs = clues.Promise.all(args),wait = new Date(),duration;
if (inputs.cancellable) inputs = inputs.cancellable();

@@ -125,5 +125,8 @@

.then(function(args) {
return fn.apply(logic, args);
duration = new Date();
return fn.apply(logic || {}, args);
})
.then(function(d) {
if (typeof $global.$duration === 'function')
$global.$duration(fullref,[(new Date()-duration),(new Date())-wait]);
return typeof d == 'string' ? d : clues(logic,d,$global,caller,fullref);

@@ -130,0 +133,0 @@ },function(e) {

{
"name": "clues",
"version": "3.3.11",
"version": "3.3.13-timing",
"description": "Lightweight logic tree solver using promises.",

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

@@ -81,6 +81,11 @@ var clues = require('../clues'),

var duration = {};
var $global = Object.create(options.$global || {},{
res : {value: res},
req : {value: req},
input: {value: req.body}
input: {value: req.body},
$duration : {value: function(ref,time) {
duration[ref] = time;
}}
});

@@ -130,2 +135,6 @@

.then(function() {
var txt = {};
txt.duration = duration;
txt = stringify(txt,pretty,options.debug);
_res.write(txt.slice(1,txt.length-1)+',\t\n');
_res.write('"__end__" : true\t\n}');

@@ -132,0 +141,0 @@ res.end();

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