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
2
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.9 to 0.2.10

23

index.js

@@ -91,9 +91,9 @@ var _ = require('lodash'),

}
options.where = searchAttrs;
}
var self = this;
var query = options.where ||  {};
var offset = options.offset ||  0;
var limit = options.limit || this.limit || 50;
var self = this;
var sort = options.sort ? convertSort(options.sort) : {

@@ -119,7 +119,14 @@ $natural: 1

.limit(limit)
.toArray(function (err, res) {
if(err || !res) return callback(err, res);
res = self._filter(res, model);
if(!model.model) return callback(err, res && res.length && res[0]);
callback(err, res);
.toArray(function (err, results) {
if(!model.model) {
if(!results || results.length === 0) {
err = err || new Error('not found');
} else {
results = self._filter(results, model);
}
return callback(err, results && results.length && results[0]);
}
if(err || !results) return callback(err, results);
results = self._filter(results, model);
callback(null, results);
});

@@ -243,2 +250,2 @@ });

module.exports = Db.MongoDB = MongoDB;
module.exports = Db.MongoDB = MongoDB;
{
"name": "backbone-db-mongodb",
"version": "0.2.9",
"version": "0.2.10",
"description": "MongoDB driver for Backbone.Db",

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

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