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

backbone-db-mongodb

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-db-mongodb - npm Package Compare versions

Comparing version 0.2.19 to 0.2.20

.npmignore

3

index.js

@@ -319,4 +319,3 @@ var _ = require('lodash'),

function(err, res) {
callback(err, res || options.ignoreFailures ? 1 : res);
callback(err, res || options.ignoreFailures ? {} : res);
}

@@ -323,0 +322,0 @@ );

{
"name": "backbone-db-mongodb",
"version": "0.2.19",
"version": "0.2.20",
"description": "MongoDB driver for Backbone.Db",

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

@@ -127,2 +127,4 @@ var setup = require('./setup');

ignoreFailures: true
}).then(function(res) {
assert.equal(typeof res, 'object');
});

@@ -129,0 +131,0 @@ });

@@ -355,7 +355,7 @@ var setup = require('./setup');

it('should fetch models with before_id and -created_at sort & limit (1)', function() {
it('should fetch models with before_id (2) and -created_at sort & limit (1)', function() {
var opts = {
sort: '-created_at',
limit: 1,
before_id: 1
before_id: 2
};

@@ -366,3 +366,3 @@ return collection

assert.equal(collection.length, 1);
assert(collection.at(0).id === 2);
assert(collection.at(0).id === 3);
});

@@ -417,2 +417,24 @@ });

it('should page through models with after_id and -created_at sort & limit (1)', function() {
var opts = {
sort: '-created_at'
};
return collection
.fetch(opts)
.then(function() {
assert(collection.at(0).id === 4);
assert(collection.at(1).id === 3);
assert(collection.at(2).id === 2);
assert(collection.at(3).id === 1);
return collection.fetch({
sort: opts.sort,
limit: 1,
after_id: 3
}).then(function() {
assert(collection.at(0).id === 2);
});
});
});
it('should fetch collections first page sorted descending', function() {

@@ -419,0 +441,0 @@ var opts = {

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