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

ss-utils

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ss-utils - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

2

package.json
{
"name": "ss-utils",
"title": "ServiceStack JavaScript Utils",
"version": "0.2.5",
"version": "0.2.6",
"description": "ServiceStack's JavaScript library providing a number of convenience utilities in developing javascript web apps. Integrates with ServiceStack's Server features including Error Handling, Validation and Server Events",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/ServiceStack/ss-utils",

@@ -68,2 +68,3 @@ ;(function (root, f) {

if (!url || url.indexOf('?') === -1) return {};
url = $.ss.splitOnFirst(url,'#')[0];
var pairs = $.ss.splitOnFirst(url, '?')[1].split('&');

@@ -600,3 +601,4 @@ var map = {};

delete qs['channel'];
$.ss.eventSourceUrl = $.ss.toUrl(url.substring(0, Math.min(url.indexOf('?'), url.length)), qs);
var pos = url.indexOf('?');
$.ss.eventSourceUrl = $.ss.toUrl(pos >= 0 ? url.substring(0, pos) : url, qs);
};

@@ -672,2 +674,8 @@ $.ss.updateSubscriberInfo = function (subscribe, unsubscribe) {

};
$.ss.onUnload = function () {
if (navigator.sendBeacon)
navigator.sendBeacon($.ss.unRegisterUrl);
else
$.ajax({ type: 'POST', url: $.ss.unRegisterUrl, async: false });
};
$.fn.handleServerEvents = function (opt) {

@@ -679,2 +687,3 @@ $.ss.eventSource = this[0];

}
$(window).on("unload", $.ss.onUnload);
function onMessage(e) {

@@ -689,3 +698,11 @@ var parts = $.ss.splitOnFirst(e.data, ' ');

var json = parts[1];
var msg = json ? JSON.parse(json) : null;
var msg, fn;
try {
msg = json ? JSON.parse(json) : null;
} catch (e) {
e.json = json;
fn = $.ss.handlers["onError"];
if (fn)
fn("JSON.parse() error", e);
}

@@ -714,3 +731,3 @@ parts = $.ss.splitOnFirst(selector, '.');

function sendHeartbeat() {
if (connectId !== $.ss.CONNECT_ID) // Only allow latest connections heartbeat callback through
if ($.ss.eventSource == null || connectId !== $.ss.CONNECT_ID) // Only allow latest connections heartbeat callback through
return;

@@ -741,11 +758,7 @@ if ($.ss.eventSource.readyState === 2) //CLOSED

}
if (opt.unRegisterUrl) {
$(window).on("unload", function () {
$.ajax({ type: 'POST', url: opt.unRegisterUrl, async: false });
});
}
$.ss.unRegisterUrl = opt.unRegisterUrl;
$.ss.updateSubscriberUrl = opt.updateSubscriberUrl;
$.ss.updateChannels((opt.channels || "").split(','));
}
var fn = $.ss.handlers[cmd];
fn = $.ss.handlers[cmd];
if (fn) {

@@ -766,3 +779,3 @@ fn.call(el || document.body, msg, e);

var fn = $.ss.handlers["onMessage"];
fn = $.ss.handlers["onMessage"];
if (fn) fn.call(el || document.body, msg, e);

@@ -769,0 +782,0 @@

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