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

cls-q

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cls-q - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

4

package.json
{
"name": "cls-q",
"version": "1.0.1",
"version": "1.1.0",
"description": "Make your promises play nice with the continuation-local-storage module.",

@@ -34,5 +34,5 @@ "main": "shim.js",

"peerDependencies": {
"continuation-local-storage": "~2",
"continuation-local-storage": "~3",
"q": ">=0.9.7"
}
}

@@ -23,3 +23,3 @@ 'use strict';

t.equal(parsed.id, key, "retrieved correct value");
t.equal(ns.get('id'), -1, "inner context value isn't available");
t.notOk(ns.get('id'), "inner context value isn't available");

@@ -42,6 +42,6 @@ if (parsed) {

fetch(ns.get('id')).then(function () {
t.equal(ns.get('id'), -1, "inner context value is lost in resolved");
t.notOk(ns.get('id'), "inner context value is lost in resolved");
client.end();
}).fail(function (error) {
t.equal(ns.get('id'), -1, "inner context value is lost in failed");
t.notOk(ns.get('id'), "inner context value is lost in failed");
t.fail(error);

@@ -52,10 +52,9 @@ });

// set a sentinel value
ns.set('id', -1);
ns.run(function () {
var saved = Q.defer();
var data = JSON.stringify({id : 1});
client.set(1, data, saved.resolve.bind(saved));
var saved = Q.defer();
var data = JSON.stringify({id : 1});
client.set(1, data, saved.resolve.bind(saved));
Q.when(saved).then(test);
Q.when(saved).then(test);
});
});

@@ -112,10 +111,9 @@

// set a sentinel value
ns.set('id', -1);
ns.run(function () {
var saved = Q.defer();
var data = JSON.stringify({id : 1});
client.set(1, data, saved.resolve.bind(saved));
var saved = Q.defer();
var data = JSON.stringify({id : 1});
client.set(1, data, saved.resolve.bind(saved));
Q.when(saved).then(test);
Q.when(saved).then(test);
});
});
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