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

ws-events-and-middlewares

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

ws-events-and-middlewares - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

13

index.js

@@ -17,2 +17,3 @@ const Emitter = require('component-emitter')

var onopenHandlers = []
let mySocketId = null

@@ -80,3 +81,3 @@ async function onmessage (event) {

function onclose (event) {
delete clients[sock.id]
delete clients[events.id]
listeners.emit('close', event)

@@ -121,3 +122,3 @@ }

}
rooms[room].push(sock.id)
rooms[room].push(events.id)
}

@@ -130,3 +131,3 @@

const index = rooms[room].indexOf(sock.id)
const index = rooms[room].indexOf(events.id)
if (index > -1) {

@@ -139,3 +140,3 @@ rooms[room].splice(index, 1)

Object.keys(rooms).map(room => {
const index = rooms[room].indexOf(sock.id)
const index = rooms[room].indexOf(events.id)
if (index > -1) {

@@ -186,2 +187,4 @@ rooms[room].splice(index, 1)

console.log('[ws-events] Se ha conectado un nuevo usuario')
let found = false

@@ -194,4 +197,6 @@ while (!found) {

clients[id] = events
mySocketId = id
}
}
}

@@ -198,0 +203,0 @@

{
"name": "ws-events-and-middlewares",
"version": "1.0.16",
"version": "1.0.17",
"description": "ws module wrapper to provide events",

@@ -5,0 +5,0 @@ "main": "index.js",

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