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

sockettwo

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sockettwo - npm Package Compare versions

Comparing version 1.1.9 to 1.2.0

24

index.js

@@ -7,2 +7,3 @@ // @ts-ignore

let socket = null;
let isConnectedToSocket = false;
// Function to connect the socket

@@ -14,2 +15,3 @@ function connectSocket(url) {

socket.on("connect", () => {
isConnectedToSocket = true;
return true;

@@ -30,3 +32,2 @@ });

socket = io(url);
try {

@@ -58,2 +59,21 @@ socket.on("disconnect", () => {

async function getCurrentPathToTrack() {
if (isConnectedToSocket) {
const currentPath = useCurrentPath();
if (currentPath) {
const status = await socket.emit(
emitEvent,
`The user is in this route ${currentPath}`,
() => {
return "Emitted!";
}
);
}
}
}
setInterval(() => {
getCurrentPathToTrack();
}, 2000);
module.exports = {

@@ -63,3 +83,3 @@ socketConnect: connectSocket,

socketEmit: emitContent,
useCurrentPath: useCurrentPath,
// useCurrentPath: useCurrentPath,
};

2

package.json

@@ -7,3 +7,3 @@ {

"name": "sockettwo",
"version": "1.1.9",
"version": "1.2.0",
"main": "index.js",

@@ -10,0 +10,0 @@ "scripts": {

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