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.3 to 0.2.4

2

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

@@ -41,2 +41,3 @@ // Type definitions for ServiceStack Utils v0.0.1

reconnectServerEvents: (opt: ReconnectServerEventsOptions) => any;
disposeServerEvents: (cb?:Function) => void;
}

@@ -43,0 +44,0 @@

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

var elFormCheck = isCheck ? parent(this,'form-check') : null;
var elInputGroup = parent(this,'input-group');
if (!isCheck)

@@ -220,8 +221,10 @@ addClass(this, 'is-invalid');

var elNext = this.nextElementSibling;
var elLast = elNext && (elNext.getAttribute('for') === this.id || elNext.tagName === "SMALL")
? (isCheck ? elFormCheck || elNext.parentElement : elNext)
: this;
var elLast = elInputGroup ? elInputGroup.lastElementChild :
(elNext && (elNext.getAttribute('for') === this.id || elNext.tagName === "SMALL")
? (isCheck ? elFormCheck || elNext.parentElement : elNext)
: this);
var elError = elLast.nextElementSibling && hasClass(elLast.nextElementSibling, 'invalid-feedback')
? elLast.nextElementSibling
: $.ss.createElement("div", { insertAfter:elLast }, { className: 'invalid-feedback' });
: (elInputGroup && elInputGroup.querySelector('.invalid-feedback'))
|| $.ss.createElement("div", { insertAfter:elLast }, { className: 'invalid-feedback' });
elError.innerHTML = errorMsg;

@@ -231,3 +234,3 @@ }

function parent(el,cls) {
while (!hasClass(el,cls))
while (el && !hasClass(el,cls))
el = el.parentElement;

@@ -237,3 +240,3 @@ return el;

function hasClass(el, cls) {
return (" " + el.className + " ").replace(/[\n\t\r]/g, " ").indexOf(" " + cls + " ") > -1;
return el && (" " + el.className + " ").replace(/[\n\t\r]/g, " ").indexOf(" " + cls + " ") > -1;
}

@@ -307,3 +310,3 @@ function addClass(el, cls) {

var isCheck = this.type === "radio" || this.type === "checkbox";
var fieldId = (!isCheck ? this.id : null) || $el.attr("name");
var fieldId = $el.attr("name") || this.id;
if (!fieldId) return;

@@ -387,3 +390,3 @@

var f = $(this);
if (orig.model)
if (orig && orig.model)
$.ss.populateForm(this,orig.model);

@@ -523,3 +526,3 @@ f.submit(function (e) {

};
$.ss.listenOn = 'click dblclick change focus blur focusin focusout select keydown keypress keyup hover toggle';
$.ss.listenOn = 'click dblclick change focus blur focusin focusout select keydown keypress keyup hover toggle input';
$.fn.bindHandlers = function (handlers) {

@@ -778,1 +781,19 @@ $.extend($.ss.handlers, handlers || {});

});
function reset() {
$.ss.eventSourceStop = false;
$.ss.eventOptions = {};
$.ss.eventReceivers = {};
$.ss.eventChannels = [];
$.ss.eventSourceUrl = $.ss.updateSubscriberUrl = $.ss.eventOptions = $.ss.eventSource = null;
}
$.ss.disposeServerEvents = function (cb) {
var unRegisterUrl = $.ss.eventOptions && $.ss.eventOptions.unRegisterUrl;
if ($.ss.eventSource) $.ss.eventSource.close();
reset();
if (unRegisterUrl) {
$.ajax({ type: 'POST', url: unRegisterUrl, complete: function() { if (cb) cb(); } });
} else {
if (cb) cb();
}
};
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