Socket
Socket
Sign inDemoInstall

collections

Package Overview
Dependencies
Maintainers
5
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collections - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

4

CHANGES.md

@@ -0,5 +1,7 @@

## v5.0.2
- Addresses a bug in range listening that happened when the number of listeners went beyond 1 and back to 0
## v5.0.1
- Changes to make IE11 use set and map polyfills
## v5.0.0

@@ -6,0 +8,0 @@ - Some backward compatibility breaking changes:

@@ -197,28 +197,30 @@ "use strict";

var tokenName = listeners.specificHandlerMethodName;
if(Array.isArray(listeners._current) && listeners._current.length) {
// notably, defaults to "handleRangeChange" or "handleRangeWillChange"
// if token is "" (the default)
if(Array.isArray(listeners._current)) {
if(listeners._current.length) {
// notably, defaults to "handleRangeChange" or "handleRangeWillChange"
// if token is "" (the default)
descriptor.isActive = true;
// dispatch each listener
try {
var i,
countI,
listener,
//removeGostListenersIfNeeded returns listeners.current or a new filtered one when conditions are met
currentListeners = listeners.removeCurrentGostListenersIfNeeded(),
Ghost = ListenerGhost;
for(i=0, countI = currentListeners.length;i<countI;i++) {
if ((listener = currentListeners[i]) !== Ghost) {
if (listener[tokenName]) {
listener[tokenName](plus, minus, index, this, beforeChange);
} else if (listener.call) {
listener.call(this, plus, minus, index, this, beforeChange);
} else {
throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable");
descriptor.isActive = true;
// dispatch each listener
try {
var i,
countI,
listener,
//removeGostListenersIfNeeded returns listeners.current or a new filtered one when conditions are met
currentListeners = listeners.removeCurrentGostListenersIfNeeded(),
Ghost = ListenerGhost;
for(i=0, countI = currentListeners.length;i<countI;i++) {
if ((listener = currentListeners[i]) !== Ghost) {
if (listener[tokenName]) {
listener[tokenName](plus, minus, index, this, beforeChange);
} else if (listener.call) {
listener.call(this, plus, minus, index, this, beforeChange);
} else {
throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable");
}
}
}
} finally {
descriptor.isActive = false;
}
} finally {
descriptor.isActive = false;
}

@@ -225,0 +227,0 @@ }

{
"name": "collections",
"version": "5.0.1",
"version": "5.0.2",
"description": "data structures with idiomatic JavaScript collection interfaces",

@@ -5,0 +5,0 @@ "homepage": "http://www.collectionsjs.com",

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