New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rethinkdbdash

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rethinkdbdash - npm Package Compare versions

Comparing version 1.16.11 to 1.16.12

test/coverage.js

112

lib/error.js

@@ -138,3 +138,29 @@ var helper = require(__dirname+"/helper.js");

var _constants = {
MONDAY: true,
TUESDAY: true,
WEDNESDAY: true,
THURSDAY: true,
FRIDAY: true,
SATURDAY: true,
SUNDAY: true,
JANUARY: true,
FEBRUARY: true,
MARCH: true,
APRIL: true,
MAY: true,
JUNE: true,
JULY: true,
AUGUST: true,
SEPTEMBER: true,
OCTOBER: true,
NOVEMBER: true,
DECEMBER: true
}
var constants = {};
for(var key in _constants) {
constants[termTypes[key]] = true;
}
var _nonPrefix = {

@@ -168,3 +194,4 @@ DB: true,

ASC: true,
RANGE: true
RANGE: true,
LITERAL: "true"
}

@@ -175,2 +202,6 @@ var nonPrefix = {};

}
// Constants are also in nonPrefix
for(var key in _constants) {
nonPrefix[termTypes[key]] = true;
}

@@ -319,3 +350,24 @@

RECONFIGURE: "reconfigure",
REBALANCE: "rebalance"
REBALANCE: "rebalance",
SPLIT: "split",
LITERAL: "literal",
MONDAY: "monday",
TUESDAY: "tuesday",
WEDNESDAY: "wednesday",
THURSDAY: "thursday",
FRIDAY: "friday",
SATURDAY: "saturday",
SUNDAY: "sunday",
JANUARY: "january",
FEBRUARY: "february",
MARCH: "march",
APRIL: "april",
MAY: "may",
JUNE: "june",
JULY: "july",
AUGUST: "august",
SEPTEMBER: "september",
OCTOBER: "october",
NOVEMBER: "november",
DECEMBER: "december"
}

@@ -351,30 +403,35 @@ var typeToString = {};

else if (helper.isPlainObject(term)) {
carify(result, '{\n', underline);
var countKeys = 0;
var totalKeys = Object.keys(term).length;
var extraToRemove = options.extra;
options.indent += INDENT+options.extra;
options.extra = 0;
for(var key in term) {
countKeys++;
//if (!((father) && (Array.isArray(father[2])) && (Object.keys(father[2]).length > 0))) options.extra = 0;
if (totalKeys === 0) {
carify(result, '{}', underline);
}
else {
carify(result, '{\n', underline);
var countKeys = 0;
var extraToRemove = options.extra;
options.indent += INDENT+options.extra;
options.extra = 0;
for(var key in term) {
countKeys++;
//if (!((father) && (Array.isArray(father[2])) && (Object.keys(father[2]).length > 0))) options.extra = 0;
carify(result, space(options.indent)+key+": ", underline);
if ((currentFrame != null) && (currentFrame === key)) {
backtrace = generateBacktrace(term[key], i, term, frames, options);
carify(result, space(options.indent)+key+": ", underline);
if ((currentFrame != null) && (currentFrame === key)) {
backtrace = generateBacktrace(term[key], i, term, frames, options);
}
else {
backtrace = generateBacktrace(term[key], i, term, null, options);
}
result.str += backtrace.str;
result.car += backtrace.car;
if (countKeys !== totalKeys) {
carify(result, ',\n', underline);
}
}
else {
backtrace = generateBacktrace(term[key], i, term, null, options);
}
result.str += backtrace.str;
result.car += backtrace.car;
if (countKeys !== totalKeys) {
carify(result, ',\n', underline);
}
options.indent -= INDENT+extraToRemove;
carify(result, "\n"+space(options.indent+extraToRemove)+"}", underline);
}
options.indent -= INDENT+extraToRemove;
carify(result, "\n"+space(options.indent+extraToRemove)+"}", underline);
}

@@ -850,2 +907,7 @@ else if (Array.isArray(term)) {

if (constants[term[0]]) {
carify(result, "r."+typeToString[term[0]], underline);
return result;
}
carify(result, "r."+typeToString[term[0]]+"(", underline);

@@ -852,0 +914,0 @@

{
"name": "rethinkdbdash",
"version": "1.16.11",
"version": "1.16.12",
"description": "A Node.js driver for RethinkDB with promises and a connection pool",

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

@@ -56,2 +56,32 @@ var config = require(__dirname+'/config.js');

})
It("`split` should work", function* (done) {
try {
result = yield r.expr("foo bar bax").split().run();
assert.deepEqual(result, ["foo", "bar", "bax"]);
done();
}
catch(e) {
done(e);
}
})
It("`split(separator)` should work", function* (done) {
try {
result = yield r.expr("12,37,,22,").split(",").run();
assert.deepEqual(result, ["12", "37", "", "22", ""]);
done();
}
catch(e) {
done(e);
}
})
It("`split(separtor, max)` should work", function* (done) {
try {
result = yield r.expr("foo bar bax").split(null, 1).run();
assert.deepEqual(result, ["foo", "bar bax"]);
done();
}
catch(e) {
done(e);
}
})

@@ -15,3 +15,3 @@ var Promise = require('bluebird');

//query = 'r.table("foo").add(1).add(1).add("hello-super-long-string").add("another-long-string").add("one-last-string").map( function(doc) { return r.expr([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]).map(function(test) { return test("b").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").mul(test("b")).merge({ firstName: "xxxxxx", lastName: "yyyy", email: "xxxxx@yyyy.com", phone: "xxx-xxx-xxxx" }); }).add(2).map(function(doc) { return doc.add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string").add("hello-super-long-string").add("another-long-string").add("one-last-string") }); })';
query = 'r.expr([1,2,3]).map(function(v) { return v}).add(1)';
query = 'r.expr({a: r.wednesday}).add([1])';
Promise.coroutine(function* () {

@@ -18,0 +18,0 @@ try {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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