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.0.1 to 0.0.2

26

lib/db.js

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

var db = model.db || options.db || new Backbone.Db(model.name || model.kind || "model");
debug("sync %s %s %s",method,model.url(),JSON.stringify(options));
debug("sync %s %s",method,JSON.stringify(options));
function callback(err, res, resp) {

@@ -58,3 +58,2 @@ debug('callback '+err+" "+JSON.stringify(res));

}
switch (method) {

@@ -125,13 +124,16 @@ case 'create':

debug("FINDALL: "+JSON.stringify(model));
var data = _.chain(this.records)
.map(function(id){
var data = this.store().getItem(this.name+':'+id, function(err, data) {
var self = this;
var key = this._getKey(model, options);
this.store().getItem(key, function(err, data) {
if(!data || err) {
return cb(err, []);
}
data = data && JSON.parse(data);
data = data.map(function(id) {
data = self.store().getItem(self.name+':'+id, function(err, data) {
return JSON.parse(data);
});
return data && JSON.parse(data);
}, this)
.compact()
.value();
return cb(null, data);
});
return(err, data);
});
},

@@ -138,0 +140,0 @@ destroy: function(model, options, cb) {

{
"name": "backbone-db",
"version": "0.0.1",
"version": "0.0.2",
"description": "Key-Value database storage interface, localStorage and in-process implementations",

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

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