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

ampersand-collection

Package Overview
Dependencies
Maintainers
1
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.0.0 to 1.0.1

3

ampersand-collection.js

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

var index = this._indexes[indexName || this.mainIndex];
return index[query] || index[query.id];
return index[query] || index[query.id] || this._indexes.cid[query.cid];
},

@@ -220,2 +220,3 @@

list.push(this.mainIndex);
list.push('cid');
var l = list.length;

@@ -222,0 +223,0 @@ this.models = [];

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

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

@@ -104,2 +104,15 @@ var test = require('tape');

test('remove events for items that only have `cid`s', function (t) {
t.plan(2);
var c = new Collection();
var moe = new Stooge({name: 'moe'});
c.add(moe);
c.on('remove', function (model, collection) {
t.equal(collection, c);
t.equal(model, moe);
});
c.remove(moe);
t.end();
});
test('comparator as a string', function (t) {

@@ -106,0 +119,0 @@ var Coll = Collection.extend({

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