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 2.0.0 to 2.1.0

15

lib/table.js

@@ -290,2 +290,17 @@ // Load Modules

internals.Table.prototype.sync = function (callback) {
var self = this;
this._table.sync().run(this._db._connection, function (err, result) {
if (err) {
return self.error('sync', err, null, callback);
}
return callback();
});
};
internals.Cursor = function (cursor) {

@@ -292,0 +307,0 @@

2

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

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

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

});
describe('sync()', function () {
it('returns when write is complete', 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.sync(function (err) {
expect(err).to.not.exist();
done();
});
});
});
});
it('fails on database error', function (done) {
var db = new Penseur.Db('penseurtest');
db.table('invalid');
db.connect(function (err) {
db.invalid.sync(function (err) {
expect(err).to.exist();
done();
});
});
});
});
});
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