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 1.1.0 to 1.2.0

5

lib/table.js

@@ -22,2 +22,7 @@ // Load Modules

if (Array.isArray(id)) {
this._run(this._table.getAll(RethinkDB.args(id)), 'get', id, callback);
return;
}
this._run(this._table.get(id), 'get', id, callback);

@@ -24,0 +29,0 @@ };

2

package.json
{
"name": "penseur",
"description": "Lightweight RethinkDB wrapper",
"version": "1.1.0",
"version": "1.2.0",
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)",

@@ -6,0 +6,0 @@ "repository": "git://github.com/hueniverse/penseur",

@@ -38,2 +38,62 @@ // Load modules

});
it('returns the requested objects', function (done) {
var db = new Penseur.Db('penseurtest');
db.establish(['test'], function (err) {
expect(err).to.not.exist();
db.test.insert([{ id: 1, a: 1 }, { id: 2, a: 2 }, { id: 3, a: 1 }], function (err, keys) {
expect(err).to.not.exist();
db.test.get([1, 3], function (err, result) {
expect(err).to.not.exist();
expect(result).to.deep.include([{ id: 3, a: 1 }, { id: 1, a: 1 }]);
done();
});
});
});
});
it('returns the requested objects found (partial)', function (done) {
var db = new Penseur.Db('penseurtest');
db.establish(['test'], function (err) {
expect(err).to.not.exist();
db.test.insert([{ id: 1, a: 1 }, { id: 2, a: 2 }, { id: 3, a: 1 }], function (err, keys) {
expect(err).to.not.exist();
db.test.get([1, 3, 4], function (err, result) {
expect(err).to.not.exist();
expect(result).to.have.length(2);
done();
});
});
});
});
it('returns the requested objects found (duplicates)', function (done) {
var db = new Penseur.Db('penseurtest');
db.establish(['test'], function (err) {
expect(err).to.not.exist();
db.test.insert([{ id: 1, a: 1 }, { id: 2, a: 2 }, { id: 3, a: 1 }], function (err, keys) {
expect(err).to.not.exist();
db.test.get([1, 3, 3], function (err, result) {
expect(err).to.not.exist();
expect(result).to.have.length(3);
done();
});
});
});
});
});

@@ -40,0 +100,0 @@

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