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

@live-change/dao-message

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/dao-message - npm Package Compare versions

Comparing version 0.5.16 to 0.5.17

22

index.js

@@ -12,3 +12,3 @@ const rd = require("@live-change/dao")

this.messageChannel = settings.messageChannel ? new MessageChannel() : null
this.port = this.messageChannel ? this.messageChannel.port1 : this.target
this.port = settings.messagePort ?? (this.messageChannel ? this.messageChannel.port1 : this.target)
this.decorator = settings.decorator || ((message) => message)

@@ -26,13 +26,17 @@ this.filter = settings.filter || ((message) => true)

})
this.target.addEventListener('error', (event) => {
console.error("Worker", this.url, "error", event)
})
this.port.addEventListener('messageerror', (event) => {
console.error("Worker", this.url, "message error", event)
})
this.target.addEventListener('unhandledrejection', (event) => {
console.error("Worker", this.url, "unhandled rejection", event)
})
if(this.target?.addEventListener) {
this.target.addEventListener('error', (event) => {
console.error("Worker", this.url, "error", event)
})
this.target.addEventListener('unhandledrejection', (event) => {
console.error("Worker", this.url, "unhandled rejection", event)
})
}
if(this.port.start) {
this.port.start()
}
if(this.messageChannel) {
this.port.start()
this.target.postMessage({ type: 'connection', port: this.messageChannel.port2 }, [this.messageChannel.port2])

@@ -59,3 +63,3 @@ }

} else {
if (this.target.terminate) this.target.terminate()
if (this.target?.terminate) this.target.terminate()
}

@@ -62,0 +66,0 @@ }

{
"name": "@live-change/dao-message",
"version": "0.5.16",
"version": "0.5.17",
"author": {

@@ -13,3 +13,3 @@ "email": "m8@em8.pl",

"dependencies": {
"@live-change/dao": "^0.5.16",
"@live-change/dao": "^0.5.17",
"debug": "^4.3.4",

@@ -45,3 +45,3 @@ "supports-color": "^7.2.0"

},
"gitHead": "85e1b0cb9e16b320c38224b926df3e74015e920d"
"gitHead": "9f37c15dbb2874f1147e340d5b82d39d417fbbb1"
}
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