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

@logux/core

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logux/core - npm Package Compare versions

Comparing version 0.8.2 to 0.8.3

17

local-pair/index.js

@@ -5,2 +5,3 @@ import { createNanoEvents } from 'nanoevents'

constructor(pair, type) {
this.connecting = false
this.connected = false

@@ -16,7 +17,13 @@ this.emitter = createNanoEvents()

} else {
this.connecting = true
this.emitter.emit('connecting')
return new Promise(resolve => {
setTimeout(() => {
if (!this.connecting) {
resolve()
return
}
this.other().connected = true
this.connected = true
this.connecting = false
this.other().emitter.emit('connect')

@@ -31,5 +38,7 @@ this.emitter.emit('connect')

disconnect(reason) {
if (!this.connected) {
throw new Error('Connection already finished')
} else {
if (this.connecting) {
this.connecting = false
this.emitter.emit('disconnect', reason)
return Promise.resolve()
} else if (this.connected) {
this.connected = false

@@ -44,2 +53,4 @@ this.emitter.emit('disconnect', reason)

})
} else {
throw new Error('Connection already finished')
}

@@ -46,0 +57,0 @@ }

2

package.json
{
"name": "@logux/core",
"version": "0.8.2",
"version": "0.8.3",
"description": "Logux core components",

@@ -5,0 +5,0 @@ "keywords": [

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