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

thinky

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thinky - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

111

lib/model.js

@@ -900,6 +900,8 @@ var util = require(__dirname+'/util.js');

if (promise instanceof Promise) {
promise.then(resolve).error(reject);
promise.then(function() {
resolve(data)
}).error(reject);
}
else {
resolve();
resolve(data);
}

@@ -937,6 +939,47 @@ }).error(reject);

for(var i=0; i<data.data.length; i++) {
reduction = [];
if (Array.isArray(data.data[i][1])) {
for(var j=0; j<data.data[i][1].length; j++) {
newDoc = new self(data.data[i][1][j]);
(function(i) {
reduction = [];
if (Array.isArray(data.data[i][1])) {
for(var j=0; j<data.data[i][1].length; j++) {
(function(j) {
newDoc = new self(data.data[i][1][j]);
newDoc.setSaved(true);
newDoc._emitRetrieve();
promise = util.hook({
postHooks: newDoc._getModel()._post.retrieve,
doc: newDoc,
async: newDoc._getModel()._async.retrieve,
fn: function() {}
})
if (promise instanceof Promise) {
promise.then(function() {
var promise = newDoc.validate();
if (promise instanceof Promise) {
promise.then(function() {
resolve(data)
}).error(reject);
}
else {
resolve(data);
}
}).error(reject);
promises.push(promise);
}
else {
promise = newDoc.validate();
if (promise instanceof Promise) promises.push(promise);
}
reduction.push(newDoc)
})(j);
}
result.push({
group: data.data[i][0],
reduction: reduction
})
}
else {
newDoc = new self(data.data[i][1]);
newDoc.setSaved(true);

@@ -956,6 +999,8 @@

if (promise instanceof Promise) {
promise.then(resolve).error(reject);
promise.then(function() {
resolve(result)
}).error(reject);
}
else {
resolve();
resolve(result);
}

@@ -970,44 +1015,8 @@ }).error(reject);

reduction.push(newDoc)
result.push({
group: data.data[i][0],
reduction: newDoc
})
}
result.push({
group: data.data[i][0],
reduction: reduction
})
}
else {
newDoc = new self(data.data[i][1]);
newDoc.setSaved(true);
newDoc._emitRetrieve();
promise = util.hook({
postHooks: newDoc._getModel()._post.retrieve,
doc: newDoc,
async: newDoc._getModel()._async.retrieve,
fn: function() {}
})
if (promise instanceof Promise) {
promise.then(function() {
var promise = newDoc.validate();
if (promise instanceof Promise) {
promise.then(resolve).error(reject);
}
else {
resolve();
}
}).error(reject);
promises.push(promise);
}
else {
promise = newDoc.validate();
if (promise instanceof Promise) promises.push(promise);
}
result.push({
group: data.data[i][0],
reduction: newDoc
})
}
})(i);
}

@@ -1045,3 +1054,5 @@ }, reject);

if (promise instanceof Promise) {
promise.then(resolve).error(reject);
promise.then(function() {
resolve(newDoc);
}).error(reject);
}

@@ -1048,0 +1059,0 @@ else {

{
"name": "thinky",
"version": "2.1.2",
"version": "2.1.3",
"description": "RethinkDB ORM for Node.js",

@@ -5,0 +5,0 @@ "main": "lib/thinky.js",

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