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.8.0 to 0.8.1

11

backbone-relations.js

@@ -174,5 +174,4 @@ (function (root, factory) {

this.prototype.relations = relations;
var check = _.first(_.values(relations));
if (_.isFunction(check.hasOne || check.hasMany)) return;
_.each(relations, function (rel) {
if (_.isFunction(rel.hasOne || rel.hasMany)) return;
if (rel.hasOne) rel.hasOne = rel.hasOne.Model;

@@ -182,6 +181,8 @@ if (rel.hasMany) rel.hasMany = rel.hasMany.Collection;

if (rel.via || !fk) return;
var Model = rel.hasOne || rel.hasMany.prototype.model;
var complement = Model.prototype.relations;
var complement = rel.hasOne || rel.hasMany.prototype.model;
if (!(complement.prototype instanceof Model)) return;
complement.resolveRelations();
var reverseRels = complement.prototype.relations;
var hasOne = !rel.hasOne;
rel.reverse = _.reduce(complement, function (reverse, rel, key) {
rel.reverse = _.reduce(reverseRels, function (reverse, rel, key) {
if (!rel.via && hasOne !== !rel.hasOne && fk === rel.fk) return key;

@@ -188,0 +189,0 @@ return reverse;

{
"name": "backbone-relations",
"version": "0.8.0",
"version": "0.8.1",
"main": "./backbone-relations.js",

@@ -5,0 +5,0 @@ "dependencies": {

{
"name": "backbone-relations",
"version": "0.8.0",
"version": "0.8.1",
"author": "Casey Foster <c@sey.me>",

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

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