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
2
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.4.13 to 0.4.15

15

lib/db.js

@@ -240,5 +240,10 @@ var Backbone = require('backbone');

this.store().getItem(id, function(err, data) {
data = data || '{}';
data = JSON.parse(data);
_.merge(data, model.toJSON(options));
data = data && JSON.parse(data);
var modelData = model.toJSON(options);
// Support for non plain object JSON types.
if(_.isPlainObject(data) && _.isPlainObject(modelData)) {
_.merge(data, modelData);
} else {
data = modelData;
}
self.store().setItem(id, JSON.stringify(data), function (err, res) {

@@ -309,4 +314,4 @@ // if models created with id.

}
debug('sync %s %s', method, JSON.stringify(options));
debug('sync %s %s %s %s', method, model.type, JSON.stringify(model.toJSON(options)), JSON.stringify(options));
if(model.type === 'video' && method === 'update') console.log(new Error().stack);
function callback(err, res, resp) {

@@ -313,0 +318,0 @@ debug('callback ' + err + ' ' + JSON.stringify(res));

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

@@ -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