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

ampersand-collection

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-collection - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

9

ampersand-collection.js

@@ -85,3 +85,3 @@ var BackboneEvents = require('backbone-events-standalone');

if (existing = this.get(id)) {
if (remove) modelMap[existing.cid] = true;
if (remove) modelMap[existing.cid || existing.id] = true;
if (merge) {

@@ -119,3 +119,4 @@ attrs = attrs === model ? model.attributes : attrs;

for (i = 0, length = this.length; i < length; i++) {
if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model);
model = this.models[i];
if (!modelMap[model.cid || model.id]) toRemove.push(model);
}

@@ -128,3 +129,2 @@ if (toRemove.length) this.remove(toRemove, options);

if (sortable) sort = true;
this.length += toAdd.length;
if (at != null) {

@@ -135,3 +135,2 @@ for (i = 0, length = toAdd.length; i < length; i++) {

} else {
if (order) this.models.length = 0;
var orderedModels = order || toAdd;

@@ -272,3 +271,3 @@ for (i = 0, length = orderedModels.length; i < length; i++) {

for (var name in this._indexes) {
delete this._indexes[name][model[name] || model.get(name)];
delete this._indexes[name][model[name] || (model.get && model.get(name))];
}

@@ -275,0 +274,0 @@ },

{
"name": "ampersand-collection",
"version": "1.3.0",
"version": "1.3.1",
"author": "Henrik Joreteg <henrik@andyet.net>",

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

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