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

backbone-db

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-db - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

1

lib/db.js

@@ -139,2 +139,3 @@ var Backbone = require('backbone');

var limit = options.limit ? options.limit : models.length;
if(options.where) models = _.where(models, options.where);
if(options.sort) models.sort(sort(options.sort));

@@ -141,0 +142,0 @@ if(options.after_id) {

2

package.json
{
"name": "backbone-db",
"version": "0.1.2",
"version": "0.1.3",
"description": "Key-Value database storage interface, localStorage and in-process implementations",

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

@@ -155,2 +155,17 @@ var Db = require('../');

it('should fetch collection filtered with given attributes', function(t) {
var collection = new MyCollection();
collection.fetch({
where: {test: 2},
success: function() {
assert.equal(collection.length, 1);
assert.equal(collection.at(0).get('test'), 2);
t();
},
error: function(err){
assert(err);
}
});
});
it('should remove a model from collection when destroyed', function(t) {

@@ -157,0 +172,0 @@ var m = new MyCollection();

Sorry, the diff of this file is not supported yet

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