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

penseur

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

penseur - npm Package Compare versions

Comparing version 8.7.5 to 8.8.0

2

lib/db.js

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

return internals.special('append', value, options); // { single: false }
return internals.special('append', value, options); // { single: false, create: false }
}

@@ -573,0 +573,0 @@

@@ -40,14 +40,10 @@ 'use strict';

let update = null;
let update = item;
if (without.length) {
update = update.without(without);
}
if (wrapped) {
if (without.length) {
update = item.without(without).merge(wrapped);
}
else {
update = item.merge(wrapped);
}
update = update.merge(wrapped);
}
else {
update = item.without(without);
}

@@ -91,8 +87,20 @@ return RethinkDB.branch(RethinkDB.eq(item, null), RethinkDB.error('No document found'), update);

if (changes.type === 'append') {
if (changes.flags.single || !Array.isArray(changes.value)) {
return row.append(changes.value);
if (changes.flags.single ||
!Array.isArray(changes.value)) {
row = row.append(changes.value);
}
else {
for (let i = 0; i < changes.value.length; ++i) {
row = row.append(changes.value[i]);
}
}
for (let i = 0; i < changes.value.length; ++i) {
row = row.append(changes.value[i]);
if (changes.flags.create) {
let check = item;
for (let i = 0; i < path.length - 1; ++i) {
check = check(path[i]);
}
return RethinkDB.branch(check.hasFields(path[path.length - 1]), row, [changes.value]);
}

@@ -116,22 +124,22 @@

const keys = Object.keys(changes);
for (let i = 0; i < keys.length; ++i) {
const key = keys[i];
for (const key in changes) {
const value = changes[key];
const wrapped = internals.wrap(value, without, item, path.concat(key));
if (wrapped !== value) {
if (ref === changes) {
ref = Object.assign({}, changes); // Shallow clone before making changes
}
if (wrapped === value) {
continue;
}
if (wrapped === undefined) {
delete ref[key];
}
else {
ref[key] = wrapped;
}
if (ref === changes) {
ref = Object.assign({}, changes); // Shallow clone before making changes
}
if (wrapped === undefined) {
delete ref[key];
}
else {
ref[key] = wrapped;
}
}
if (keys.length &&
if (Object.keys(changes).length &&
!Object.keys(ref).length &&

@@ -138,0 +146,0 @@ !Array.isArray(ref)) {

{
"name": "penseur",
"description": "Lightweight RethinkDB wrapper",
"version": "8.7.5",
"version": "8.8.0",
"repository": "git://github.com/hueniverse/penseur",

@@ -6,0 +6,0 @@ "main": "lib/index.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