Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-relations

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-relations - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

14

backbone-relations.js

@@ -49,3 +49,2 @@ (function () {

owner.set(fk, model.id, options);
if (reverse) model.get(reverse).add(owner, options);
});

@@ -55,2 +54,12 @@ owner.on('change:' + fk, function (__, val, options) {

});
if (reverse) {
instance.on({
add: function (model, __, options) {
model.get(reverse).add(owner, options);
},
remove: function (model, __, options) {
model.get(reverse).remove(owner, options);
}
});
}
return instance;

@@ -86,3 +95,4 @@ },

if (!this.via) return instance;
var models = instance.via.pluck(this.via.split('#')[1] || this.key);
var split = this.via.split('#');
var models = this.owner.get(split[0]).pluck(split[1] || this.key);
return instance.set(

@@ -89,0 +99,0 @@ models[0] instanceof this.hasMany ?

2

package.json
{
"name": "backbone-relations",
"version": "0.4.1",
"version": "0.4.2",
"author": "Casey Foster <c@sey.me>",

@@ -5,0 +5,0 @@ "licence": "MIT",

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