New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

diode

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diode - npm Package Compare versions

Comparing version 6.3.0 to 6.3.1

yarn.lock

7

CHANGELOG.md
# Changelog
## 6.3.1
- Fixed issue where subscriptions removed during other callbacks would
invoke missing handler
- Fixed issue where removing a subscription with a different scope
would remove others
## 6.3.0

@@ -4,0 +11,0 @@

2

package.json
{
"name": "diode",
"version": "6.3.0",
"version": "6.3.1",
"description": "A simple event emitter.",

@@ -5,0 +5,0 @@ "main": "src/diode.js",

@@ -27,7 +27,17 @@ /**

*/
app.ignore = app.unsubscribe = function (unwanted) {
callbacks = callbacks.filter(function(entry) {
return entry.callback !== unwanted
})
app.ignore = app.unsubscribe = function (callback, scope) {
var hasScope = arguments.length > 1
var i = 0
while (i < callbacks.length) {
var cb = callbacks[i]
if (cb.callback === callback && (!hasScope || cb.scope === scope)) {
callbacks.splice(i, 1)
continue
}
i += 1
}
return app

@@ -40,3 +50,3 @@ }

app.emit = app.publish = function () {
for (var i = 0, size = callbacks.length; i < size; i++) {
for (var i = 0; i < callbacks.length; i++) {
callbacks[i].callback.apply(callbacks[i].scope, arguments)

@@ -43,0 +53,0 @@ }

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