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

hub.js

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hub.js - npm Package Compare versions

Comparing version 0.2.13 to 0.2.14

10

dist/index.browser.js

@@ -107,2 +107,9 @@ var $1662971556 = require('brisky-struct')

const $1094503762_send = (val, stamp, struct) => {
if (stamp < 0 && struct.parent(t => {
if (t.key === 'clients') {
return true
}
})) {
return
}
let hub

@@ -396,2 +403,3 @@ let p = struct

$3357289264_next(() => {
// delete info.reset // tmp
const stamp = $826337949.create()

@@ -480,3 +488,3 @@ if (!hub.receiveOnly) {

) {
client.set(null, stamp)
client.set(null, -stamp)
delete clients[key]

@@ -483,0 +491,0 @@ }

67

dist/index.js

@@ -107,2 +107,9 @@ var $1662971556 = require('brisky-struct')

const $1094503762_send = (val, stamp, struct) => {
if (stamp < 0 && struct.parent(t => {
if (t.key === 'clients') {
return true
}
})) {
return
}
let hub

@@ -420,2 +427,3 @@ let p = struct

$3357289264_next(() => {
// delete info.reset // tmp
const stamp = $826337949.create()

@@ -504,3 +512,3 @@ if (!hub.receiveOnly) {

) {
client.set(null, stamp)
client.set(null, -stamp)
delete clients[key]

@@ -772,14 +780,17 @@ }

const $2641472318_cache = (client, struct, stamp) => {
// 0b100000000000000000000000000000000000000000000
const $2641472318_contextBit = 17592186044416
const $2641472318_cache = (client, struct, hub, stamp) => {
if (!client.cache) client.cache = {}
client.cache[$1662971556.puid(struct)] = stamp
client.cache[$1662971556.puid(struct)] = hub.contextKey === undefined ? stamp
: stamp | $2641472318_contextBit
}
const $2641472318_isCached = (client, struct, stamp) => client.cache &&
client.cache[$1662971556.puid(struct)] === stamp
const $2641472318_isCached = (client, struct, hub, stamp) => client.cache &&
client.cache[$1662971556.puid(struct)] === hub.contextKey === undefined ? stamp
: stamp | $2641472318_contextBit
// const isCached = () => false
var $2641472318_$ALL$ = {

@@ -855,3 +866,3 @@ cache: $2641472318_cache,

// think of something fast for level...
$727036942_serialize(client, $727036942_progress(client), subs, prop, $1662971556.get(hub, 'serverIndex'), true)
$727036942_serialize(client, $727036942_progress(client), subs, prop, hub, $1662971556.get(hub, 'serverIndex'), true)
}

@@ -863,7 +874,7 @@ prop = previous

}
$727036942_serialize(client, $727036942_progress(client), subs, struct, $1662971556.get(hub, 'serverIndex'), isRemoved)
$727036942_serialize(client, $727036942_progress(client), subs, struct, hub, $1662971556.get(hub, 'serverIndex'), isRemoved)
}
}
const $727036942_serialize = (client, t, subs, struct, level, isRemoved) => {
const $727036942_serialize = (client, t, subs, struct, hub, level, isRemoved) => {
if (!struct) {

@@ -892,3 +903,3 @@ console.log('NO STRUCT FISHY IN SERVER SERIALIZE --- BUG')

if (isRemoved) {
$2641472318_cache(client, struct, stamp)
$2641472318_cache(client, struct, hub, stamp)
s.stamp = stamp

@@ -900,11 +911,11 @@ s.val = val

if ($1662971556.getVal(type) !== 'hub') {
$727036942_serialize(client, t, subs.type, type, level)
$727036942_serialize(client, t, subs.type, type, hub, level)
}
}
$2641472318_cache(client, struct, stamp)
$2641472318_cache(client, struct, hub, stamp)
s.stamp = stamp
if (struct.key === 'type') {
if (val === 'hub') return
$727036942_serialize(client, t, subs, $1662971556.getType(struct, val), level)
$727036942_serialize(client, t, subs, $1662971556.getType(struct, val), hub, level)
// allways need a stamp!

@@ -916,3 +927,3 @@ }

s.val.unshift('@', 'root')
$727036942_serialize(client, t, subs, val, level)
$727036942_serialize(client, t, subs, val, hub, level)
} else if (val !== void 0) {

@@ -926,3 +937,3 @@ s.val = val

val.__tmp__ = true
$727036942_serialize(client, t, subs, val, level, false)
$727036942_serialize(client, t, subs, val, hub, level, false)
delete val.__tmp__

@@ -934,3 +945,3 @@ }

struct.__tmp__ = true
$727036942_deepSerialize($1662971556.getKeys(struct), client, t, subs, struct, level)
$727036942_deepSerialize($1662971556.getKeys(struct), client, t, subs, struct, hub, level)
delete struct.__tmp__

@@ -940,3 +951,3 @@ }

const $727036942_deepSerialize = (keys, client, t, subs, struct, level) => {
const $727036942_deepSerialize = (keys, client, t, subs, struct, hub, level) => {
var type

@@ -949,3 +960,3 @@ if ((type = $1662971556.get(struct, 'type')) && type.compute() !== 'hub') {

let prop = $1662971556.get(struct, keys[i])
if (prop && prop.isHub) $727036942_serialize(client, t, subs, prop, level)
if (prop && prop.isHub) $727036942_serialize(client, t, subs, prop, hub, level)
}

@@ -956,3 +967,3 @@ }

let prop = struct._removed[i]
$727036942_serialize(client, t, subs, prop, level, true)
$727036942_serialize(client, t, subs, prop, hub, level, true)
}

@@ -976,2 +987,3 @@ }

const $1380346132_removeClient = client => {
// console.log('🌵 remove client--- 🌵', client)
const id = client.key

@@ -1040,3 +1052,3 @@ client.val = null

if (payload.val !== void 0 && payload.stamp) {
$2641472318_cache(client, hub, payload.stamp)
$2641472318_cache(client, hub, hub, payload.stamp)
}

@@ -1071,3 +1083,5 @@ }

if (socket.external !== null) {
if (client) $1380346132_removeClient(client)
if (client) {
$1380346132_removeClient(client)
}
$834150420_set(meta, socket, t, payload, contextSwitched)

@@ -1083,3 +1097,5 @@ } else {

} else {
if (client) $1380346132_removeClient(client)
if (client) {
$1380346132_removeClient(client)
}
$834150420_set(meta, socket, t, payload, contextSwitched)

@@ -1193,3 +1209,6 @@ }

const close = () => {
if (socket.client) $1380346132_removeClient(socket.client)
// console.log('🍄 close connection')
if (socket.client) {
$1380346132_removeClient(socket.client)
}
}

@@ -1196,0 +1215,0 @@ socket.on('close', close)

{
"name": "hub.js",
"description": "Seamless realtime communcation",
"version": "0.2.13",
"version": "0.2.14",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "browser": {

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