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.1.6 to 0.1.7

2

package.json
{
"name": "ss-utils",
"title": "ServiceStack JavaScript Utils",
"version": "0.1.6",
"version": "0.1.7",
"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",

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

$.ss.dfmthm = function (d) { return d.getFullYear() + '/' + pad(d.getMonth() + 1) + '/' + pad(d.getDate()) + ' ' + pad(d.getHours()) + ":" + pad(d.getMinutes()); };
$.ss.tfmt12 = function (d) { return pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds()) + " " + (d.getHours() > 12 ? "PM" : "AM"); };
$.ss.tfmt12 = function (d) { return pad((d.getHours() + 24) % 12 || 12) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds()) + " " + (d.getHours() > 12 ? "PM" : "AM"); };
$.ss.splitOnFirst = function (s, c) { if (!s) return [s]; var pos = s.indexOf(c); return pos >= 0 ? [s.substring(0, pos), s.substring(pos + 1)] : [s]; };

@@ -485,3 +485,3 @@ $.ss.splitOnLast = function (s, c) { if (!s) return [s]; var pos = s.lastIndexOf(c); return pos >= 0 ? [s.substring(0, pos), s.substring(pos + 1)] : [s]; };

if (opt.handlers) {
$.extend($.ss.handlers, opt.handlers);
$.extend($.ss.handlers, opt.handlers || {});
}

@@ -512,4 +512,6 @@ function onMessage(e) {

$els = cssSel && $(cssSel), el = $els && $els[0];
if (op == "cmd") {
if (cmd == "onConnect") {
$.extend(e, { cmd: cmd, op: op, selector: selector, target: target, cssSelector: cssSel, json: json });
if (op === "cmd") {
if (cmd === "onConnect") {
$.extend(opt, msg);

@@ -521,3 +523,3 @@ if (opt.heartbeatUrl) {

opt.heartbeat = window.setInterval(function () {
if ($.ss.eventSource.readyState == 2) //CLOSED
if ($.ss.eventSource.readyState === 2) //CLOSED
{

@@ -544,3 +546,3 @@ window.clearInterval(opt.heartbeat);

if (opt.unRegisterUrl) {
$(window).unload(function () {
$(window).on("unload", function () {
$.post(opt.unRegisterUrl, null, function (r) { });

@@ -557,6 +559,6 @@ });

}
else if (op == "trigger") {
else if (op === "trigger") {
$(el || document).trigger(cmd, [msg, e]);
}
else if (op == "css") {
else if (op === "css") {
$($els || document.body).css(cmd, msg, e);

@@ -569,8 +571,20 @@ }

if (opt.success) {
opt.success(selector, msg, e);
}
var fn = $.ss.handlers["onMessage"];
if (fn) fn.cal(el || document.body, msg, e);
if (opt.success) opt.success(selector, msg, e); //deprecated
}
$.ss.eventSource.onmessage = onMessage;
var hold = $.ss.eventSource.onerror;
$.ss.eventSource.onerror = function () {
var args = arguments;
window.setTimeout(function () {
$.ss.reconnectServerEvents({ errorArgs: args });
if (hold)
hold.apply(args);
}, 10000);
};
};
});
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