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

partysocket

Package Overview
Dependencies
Maintainers
1
Versions
932
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partysocket - npm Package Compare versions

Comparing version 0.0.0-abbd784 to 0.0.0-c4bc1f2

20

dist/index.js
import ReconnectingWebSocket from "./ws";
function generateUUID() {
if (crypto.randomUUID) {
return crypto.randomUUID();
}
let d = new Date().getTime();
let d2 = typeof performance !== "undefined" && performance.now && performance.now() * 1e3 || 0;
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
let r = Math.random() * 16;
if (d > 0) {
r = (d + r) % 16 | 0;
d = Math.floor(d / 16);
} else {
r = (d2 + r) % 16 | 0;
d2 = Math.floor(d2 / 16);
}
return (c === "x" ? r : r & 3 | 8).toString(16);
});
}
class PartySocket extends ReconnectingWebSocket {
constructor(partySocketOptions) {
const { host, room, protocol, query, protocols, ...socketOptions } = partySocketOptions;
const _pk = crypto.randomUUID();
const _pk = generateUUID();
let url = `${protocol || (host.startsWith("localhost:") || host.startsWith("127.0.0.1:") ? "ws" : "wss")}://${host}/party/${room}`;

@@ -7,0 +25,0 @@ if (query) {

2

package.json
{
"name": "partysocket",
"version": "0.0.0-abbd784",
"version": "0.0.0-c4bc1f2",
"description": "party hotline",

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

Sorry, the diff of this file is not supported yet

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