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

resolve-subscribe-socket.io

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-subscribe-socket.io - npm Package Compare versions

Comparing version 0.18.7 to 0.18.8

9

es/index.js

@@ -7,5 +7,3 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

var createClientAdapter = function createClientAdapter(_ref) {
var origin = _ref.origin,
rootPath = _ref.rootPath,
url = _ref.url,
var url = _ref.url,
onEvent = _ref.onEvent;

@@ -33,4 +31,7 @@ var client;

return new Promise(function (resolve, reject) {
var protocolLength = 'https://'.length;
var origin = url.substr(0, url.substr(protocolLength).indexOf('/') + protocolLength);
var path = url.substr(url.substr(protocolLength).indexOf('/') + protocolLength);
client = socketIOClient(origin, {
path: "" + (rootPath ? "/" + rootPath : '') + url
path: path
});

@@ -37,0 +38,0 @@ client.on('connect', function () {

@@ -17,5 +17,3 @@ "use strict";

var createClientAdapter = function createClientAdapter(_ref) {
var origin = _ref.origin,
rootPath = _ref.rootPath,
url = _ref.url,
var url = _ref.url,
onEvent = _ref.onEvent;

@@ -43,4 +41,7 @@ var client;

return new Promise(function (resolve, reject) {
var protocolLength = 'https://'.length;
var origin = url.substr(0, url.substr(protocolLength).indexOf('/') + protocolLength);
var path = url.substr(url.substr(protocolLength).indexOf('/') + protocolLength);
client = (0, _socket.default)(origin, {
path: "" + (rootPath ? "/" + rootPath : '') + url
path: path
});

@@ -47,0 +48,0 @@ client.on('connect', function () {

{
"name": "resolve-subscribe-socket.io",
"version": "0.18.7",
"version": "0.18.8",
"description": "This package serves as an adapter for resolve-redux subscribe to events.",

@@ -5,0 +5,0 @@ "engines": {

@@ -8,3 +8,3 @@ import socketIOClient from 'socket.io-client'

const createClientAdapter = ({ origin, rootPath, url, onEvent }) => {
const createClientAdapter = ({ url, onEvent }) => {
let client

@@ -20,6 +20,13 @@ let isInitialized

return await new Promise((resolve, reject) => {
client = socketIOClient(origin, {
path: `${rootPath ? `/${rootPath}` : ''}${url}`
})
const protocolLength = 'https://'.length
const origin = url.substr(
0,
url.substr(protocolLength).indexOf('/') + protocolLength
)
const path = url.substr(
url.substr(protocolLength).indexOf('/') + protocolLength
)
client = socketIOClient(origin, { path })
client.on('connect', () => {

@@ -26,0 +33,0 @@ isInitialized = true

Sorry, the diff of this file is not supported yet

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