Comparing version 8.7.4 to 8.7.5
@@ -98,3 +98,3 @@ 'use strict'; | ||
tests.push(RethinkDB[value.flags.condition || 'and'].apply(RethinkDB, conditions)); | ||
tests.push(RethinkDB[value.flags.condition || 'and'](...conditions)); | ||
} | ||
@@ -115,3 +115,3 @@ } | ||
tests.push(RethinkDB[value.flags.condition || 'and'].apply(RethinkDB, conditions)); | ||
tests.push(RethinkDB[value.flags.condition || 'and'](...conditions)); | ||
} | ||
@@ -146,3 +146,3 @@ } | ||
let test = RethinkDB.or.apply(RethinkDB, ors); | ||
let test = RethinkDB.or(...ors); | ||
if (value.flags.not) { | ||
@@ -178,3 +178,3 @@ test = test.not(); | ||
criteria = (tests.length === 1 ? tests[0] : RethinkDB.and.apply(RethinkDB, tests)); | ||
criteria = (tests.length === 1 ? tests[0] : RethinkDB.and(...tests)); | ||
@@ -251,3 +251,3 @@ if (edges.length) { | ||
value.flags.and.forEach((condition) => ands.push(row[condition.comparator](condition.value).default(null))); | ||
return RethinkDB.and.apply(RethinkDB, ands); | ||
return RethinkDB.and(...ands); | ||
}; | ||
@@ -254,0 +254,0 @@ |
@@ -283,3 +283,3 @@ 'use strict'; | ||
opts = Hoek.shallow(opts); | ||
opts = Object.assign({}, opts); // Shallow cloned | ||
opts.id = { type: opts.id }; | ||
@@ -311,3 +311,3 @@ } | ||
tables = Hoek.shallow(tables); | ||
tables = Object.assign({}, tables); // Shallow cloned | ||
const names = Object.keys(tables); | ||
@@ -314,0 +314,0 @@ names.forEach((name) => { |
@@ -7,3 +7,2 @@ 'use strict'; | ||
const Boom = require('boom'); | ||
const Hoek = require('hoek'); | ||
const Radix62 = require('radix62'); | ||
@@ -136,3 +135,3 @@ | ||
if (item[table.primary] === undefined) { | ||
item = Hoek.shallow(item); | ||
item = Object.assign({}, item); // Shallow cloned | ||
identifiers.push(item); | ||
@@ -266,3 +265,3 @@ } | ||
if (!Hoek.isInteger(record[table._id.key])) { | ||
if (!Number.isSafeInteger(record[table._id.key])) { | ||
throw Boom.internal(`Increment id record contains non-integer value: ${table.name}`); | ||
@@ -269,0 +268,0 @@ } |
'use strict'; | ||
exports.Db = require('./db'); | ||
exports.Table = require('./table'); | ||
exports.utils = require('./utils'); | ||
exports.r = require('rethinkdb'); | ||
// Load modules | ||
const Db = require('./db'); | ||
const Table = require('./table'); | ||
const Utils = require('./utils'); | ||
const RethinkDb = require('rethinkdb'); | ||
// Declare internals | ||
const internals = {}; | ||
module.exports = { | ||
Db, | ||
Table, | ||
utils: Utils, | ||
r: RethinkDb | ||
}; |
@@ -121,3 +121,3 @@ 'use strict'; | ||
if (ref === changes) { | ||
ref = Hoek.shallow(changes); // Shallow clone before making changes | ||
ref = Object.assign({}, changes); // Shallow clone before making changes | ||
} | ||
@@ -124,0 +124,0 @@ |
@@ -30,3 +30,3 @@ 'use strict'; | ||
keys = Hoek.unique(keys.concat(Object.keys(base))); | ||
keys = [...new Set(keys.concat(Object.keys(base)))]; // Unique keys | ||
} | ||
@@ -44,2 +44,3 @@ | ||
} | ||
return; | ||
@@ -46,0 +47,0 @@ } |
{ | ||
"name": "penseur", | ||
"description": "Lightweight RethinkDB wrapper", | ||
"version": "8.7.4", | ||
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)", | ||
"version": "8.7.5", | ||
"repository": "git://github.com/hueniverse/penseur", | ||
@@ -11,10 +10,7 @@ "main": "lib/index.js", | ||
], | ||
"engines": { | ||
"node": ">=8.9.0" | ||
}, | ||
"dependencies": { | ||
"boom": "7.x.x", | ||
"bounce": "1.x.x", | ||
"hoek": "5.x.x", | ||
"joi": "13.x.x", | ||
"hoek": "6.x.x", | ||
"joi": "14.x.x", | ||
"radix62": "1.x.x", | ||
@@ -25,3 +21,3 @@ "rethinkdb": "2.3.x" | ||
"code": "5.x.x", | ||
"lab": "15.x.x", | ||
"lab": "16.x.x", | ||
"teamwork": "3.x.x" | ||
@@ -28,0 +24,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1854
74760
3
+ Addedjoi@14.3.1(transitive)
- Removedhoek@5.0.4(transitive)
- Removedjoi@13.7.0(transitive)
Updatedhoek@6.x.x
Updatedjoi@14.x.x