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

qq

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qq - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "qq",
"description": "A heavy-weight library for promises, based on Q",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "http://github.com/kriskowal/qq/",

@@ -6,0 +6,0 @@ "author": "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/)",

@@ -204,24 +204,15 @@ (function (require, exports) {

return object;
} else if (Array.isArray(object)) {
return reduceLeft(object, function (values, value) {
return Q.when(deep(value), function (value) {
return values.concat([value]);
});
}, []);
} else {
var result = {};
var synchronize;
for (var name in object) {
if (has.call(object, name)) {
(function (name, value) {
synchronize = Q.when(synchronize, function () {
return Q.when(deep(value), function (value) {
result[name] = value;
});
for (var i in object) {
(function (i, value) {
synchronize = Q.when(synchronize, function () {
return Q.when(deep(value), function (value) {
object[i] = value;
});
})(name, object[name]);
}
});
})(i, object[i]);
}
return Q.when(synchronize, function () {
return result;
return object;
});

@@ -232,2 +223,3 @@ }

/**

@@ -234,0 +226,0 @@ * The reduce methods all have the signature of `reduce` on

@@ -23,4 +23,13 @@

exports['test deep'] = function (ASSERT, done) {
var before = [{"a": Q.ref(10)}, Q.ref(20)];
Q.when(Q.deep(before), function (after) {
ASSERT.ok(before === after, 'array modified in place');
ASSERT.ok(before[0] === after[0], 'object modified in place');
ASSERT.deepEqual(after, [{"a": 10}, 20], 'deeply equal afterward');
}).then(done, done);
};
if (module == require.main)
require('test').run(exports)

Sorry, the diff of this file is not supported yet

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