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.5 to 0.8.6

12

backbone-relations.js

@@ -40,7 +40,8 @@ (function (root, factory) {

if (!this.via) return this.get();
var via = this.owner.relations[this.via];
var owner = this.owner;
var via = owner.relations[this.via];
var method = via.hasOne ? 'get' : 'pluck';
var resolved = this.owner.resolve(this.via)[method](this.viaKey);
var resolved = owner.resolve(this.via)[method](this.viaKey);
if (this.hasOne) return resolved;
return new this.hasMany(
resolved = new this.hasMany(
resolved[0] instanceof this.hasMany ?

@@ -50,2 +51,7 @@ _.flatten(_.pluck(resolved, 'models')) :

);
resolved.urlRoot = this.urlRoot || '/' + this.key;
resolved.url = this.url || function () {
return _.result(owner, 'url') + this.urlRoot;
};
return resolved;
},

@@ -52,0 +58,0 @@

{
"name": "backbone-relations",
"version": "0.8.5",
"version": "0.8.6",
"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