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

kapsule

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kapsule - npm Package Compare versions

Comparing version 1.14.1 to 1.14.2

529

dist/kapsule.js

@@ -1,2 +0,2 @@

// Version 1.14.1 kapsule - https://github.com/vasturiano/kapsule
// Version 1.14.2 kapsule - https://github.com/vasturiano/kapsule
(function (global, factory) {

@@ -94,72 +94,491 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
var freeGlobal$1 = freeGlobal;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal$1 || freeSelf || Function('return this')();
var root$1 = root;
/** Built-in value references. */
var Symbol$1 = root$1.Symbol;
var Symbol$2 = Symbol$1;
/** Used for built-in method references. */
var objectProto$1 = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto$1.hasOwnProperty;
/**
* Returns a function, that, as long as it continues to be invoked, will not
* be triggered. The function will be called after it stops being called for
* N milliseconds. If `immediate` is passed, trigger the function on the
* leading edge, instead of the trailing. The function also has a property 'clear'
* that is a function which will clear the timer to prevent previously scheduled executions.
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString$1 = objectProto$1.toString;
/** Built-in value references. */
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @source underscore.js
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
* @param {Function} function to wrap
* @param {Number} timeout in ms (`100`)
* @param {Boolean} whether to execute at the beginning (`false`)
* @api public
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag$1),
tag = value[symToStringTag$1];
function debounce(func, wait, immediate){
var timeout, args, context, timestamp, result;
if (null == wait) wait = 100;
try {
value[symToStringTag$1] = undefined;
var unmasked = true;
} catch (e) {}
function later() {
var last = Date.now() - timestamp;
if (last < wait && last >= 0) {
timeout = setTimeout(later, wait - last);
var result = nativeObjectToString$1.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag$1] = tag;
} else {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
context = args = null;
}
delete value[symToStringTag$1];
}
}
var debounced = function(){
context = this;
args = arguments;
timestamp = Date.now();
var callNow = immediate && !timeout;
if (!timeout) timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args);
context = args = null;
return result;
}
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && baseGetTag(value) == symbolTag);
}
/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/**
* The base implementation of `_.trim`.
*
* @private
* @param {string} string The string to trim.
* @returns {string} Returns the trimmed string.
*/
function baseTrim(string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string;
}
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = function() {
return root$1.Date.now();
};
var now$1 = now;
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time;
// Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
timeWaiting = wait - timeSinceLastCall;
return maxing
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
: timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
var time = now$1();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
};
}
debounced.clear = function() {
if (timeout) {
clearTimeout(timeout);
timeout = null;
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
};
debounced.flush = function() {
if (timeout) {
result = func.apply(context, args);
context = args = null;
clearTimeout(timeout);
timeout = null;
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now$1());
}
function debounced() {
var time = now$1(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
};
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
// Adds compatibility for ES modules
debounce.debounce = debounce;
var debounce_1 = debounce;
var Prop = /*#__PURE__*/_createClass(function Prop(name, _ref) {

@@ -219,3 +638,3 @@ var _ref$default = _ref["default"],

};
var digest = debounce_1(function () {
var digest = debounce(function () {
if (!state.initialised) {

@@ -222,0 +641,0 @@ return;

4

dist/kapsule.min.js

@@ -1,2 +0,2 @@

// Version 1.14.1 kapsule - https://github.com/vasturiano/kapsule
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).Kapsule=t()}(this,(function(){"use strict";function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,(i=r.key,o=void 0,"symbol"==typeof(o=function(n,t){if("object"!=typeof n||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var r=e.call(n,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(i,"string"))?o:String(o)),r)}var i,o}function t(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function e(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var r,i,o,u,a=[],l=!0,f=!1;try{if(o=(e=e.call(n)).next,0===t){if(Object(e)!==e)return;l=!1}else for(;!(l=(r=o.call(e)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(n){f=!0,i=n}finally{try{if(!l&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw i}}return a}}(n,t)||function(n,t){if(!n)return;if("string"==typeof n)return r(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return r(n,t)}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function i(n,t,e){var r,i,o,u,a;function l(){var f=Date.now()-u;f<t&&f>=0?r=setTimeout(l,t-f):(r=null,e||(a=n.apply(o,i),o=i=null))}null==t&&(t=100);var f=function(){o=this,i=arguments,u=Date.now();var f=e&&!r;return r||(r=setTimeout(l,t)),f&&(a=n.apply(o,i),o=i=null),a};return f.clear=function(){r&&(clearTimeout(r),r=null)},f.flush=function(){r&&(a=n.apply(o,i),o=i=null,clearTimeout(r),r=null)},f}i.debounce=i;var o=i,u=t((function n(t,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,u=void 0===o||o,a=e.onChange,l=void 0===a?function(n,t){}:a;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.name=t,this.defaultVal=i,this.triggerUpdate=u,this.onChange=l}));return function(n){var t=n.stateInit,r=void 0===t?function(){return{}}:t,i=n.props,a=void 0===i?{}:i,l=n.methods,f=void 0===l?{}:l,c=n.aliases,s=void 0===c?{}:c,d=n.init,v=void 0===d?function(){}:d,p=n.update,y=void 0===p?function(){}:p,h=Object.keys(a).map((function(n){return new u(n,a[n])}));return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},r instanceof Function?r(n):r,{initialised:!1}),i={};function u(t){return a(t,n),l(),u}var a=function(n,e){v.call(u,n,t,e),t.initialised=!0},l=o((function(){t.initialised&&(y.call(u,t,i),i={})}),1);return h.forEach((function(n){u[n.name]=function(n){var e=n.name,r=n.triggerUpdate,o=void 0!==r&&r,a=n.onChange,f=void 0===a?function(n,t){}:a,c=n.defaultVal,s=void 0===c?null:c;return function(n){var r=t[e];if(!arguments.length)return r;var a=void 0===n?s:n;return t[e]=a,f.call(u,a,t,r),!i.hasOwnProperty(e)&&(i[e]=r),o&&l(),u}}(n)})),Object.keys(f).forEach((function(n){u[n]=function(){for(var e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=f[n]).call.apply(e,[u,t].concat(i))}})),Object.entries(s).forEach((function(n){var t=e(n,2),r=t[0],i=t[1];return u[r]=u[i]})),u.resetProps=function(){return h.forEach((function(n){u[n.name](n.defaultVal)})),u},u.resetProps(),t._rerender=l,u}}}));
// Version 1.14.2 kapsule - https://github.com/vasturiano/kapsule
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).Kapsule=n()}(this,(function(){"use strict";function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,"symbol"==typeof(o=function(t,n){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(i,"string"))?o:String(o)),r)}var i,o}function n(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,i,o,u,a=[],f=!0,c=!1;try{if(o=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;f=!1}else for(;!(f=(r=o.call(e)).done)&&(a.push(r.value),a.length!==n);f=!0);}catch(t){c=!0,i=t}finally{try{if(!f&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(c)throw i}}return a}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return r(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return r(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var i="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,u=i||o||Function("return this")(),a=u.Symbol,f=Object.prototype,c=f.hasOwnProperty,l=f.toString,v=a?a.toStringTag:void 0;var s=Object.prototype.toString;var d="[object Null]",p="[object Undefined]",y=a?a.toStringTag:void 0;function b(t){return null==t?void 0===t?p:d:y&&y in Object(t)?function(t){var n=c.call(t,v),e=t[v];try{t[v]=void 0;var r=!0}catch(t){}var i=l.call(t);return r&&(n?t[v]=e:delete t[v]),i}(t):function(t){return s.call(t)}(t)}var g="[object Symbol]";var h=/\s/;var m=/^\s+/;function j(t){return t?t.slice(0,function(t){for(var n=t.length;n--&&h.test(t.charAt(n)););return n}(t)+1).replace(m,""):t}function O(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}var w=NaN,S=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,E=/^0o[0-7]+$/i,x=parseInt;function A(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&b(t)==g}(t))return w;if(O(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=O(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=j(t);var e=T.test(t);return e||E.test(t)?x(t.slice(2),e?2:8):S.test(t)?w:+t}var P=function(){return u.Date.now()},C="Expected a function",I=Math.max,U=Math.min;function N(t,n,e){var r,i,o,u,a,f,c=0,l=!1,v=!1,s=!0;if("function"!=typeof t)throw new TypeError(C);function d(n){var e=r,o=i;return r=i=void 0,c=n,u=t.apply(o,e)}function p(t){var e=t-f;return void 0===f||e>=n||e<0||v&&t-c>=o}function y(){var t=P();if(p(t))return b(t);a=setTimeout(y,function(t){var e=n-(t-f);return v?U(e,o-(t-c)):e}(t))}function b(t){return a=void 0,s&&r?d(t):(r=i=void 0,u)}function g(){var t=P(),e=p(t);if(r=arguments,i=this,f=t,e){if(void 0===a)return function(t){return c=t,a=setTimeout(y,n),l?d(t):u}(f);if(v)return clearTimeout(a),a=setTimeout(y,n),d(f)}return void 0===a&&(a=setTimeout(y,n)),u}return n=A(n)||0,O(e)&&(l=!!e.leading,o=(v="maxWait"in e)?I(A(e.maxWait)||0,n):o,s="trailing"in e?!!e.trailing:s),g.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=f=i=a=void 0},g.flush=function(){return void 0===a?u:b(P())},g}var $=n((function t(n,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,u=void 0===o||o,a=e.onChange,f=void 0===a?function(t,n){}:a;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=n,this.defaultVal=i,this.triggerUpdate=u,this.onChange=f}));return function(t){var n=t.stateInit,r=void 0===n?function(){return{}}:n,i=t.props,o=void 0===i?{}:i,u=t.methods,a=void 0===u?{}:u,f=t.aliases,c=void 0===f?{}:f,l=t.init,v=void 0===l?function(){}:l,s=t.update,d=void 0===s?function(){}:s,p=Object.keys(o).map((function(t){return new $(t,o[t])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign({},r instanceof Function?r(t):r,{initialised:!1}),i={};function o(n){return u(n,t),f(),o}var u=function(t,e){v.call(o,t,n,e),n.initialised=!0},f=N((function(){n.initialised&&(d.call(o,n,i),i={})}),1);return p.forEach((function(t){o[t.name]=function(t){var e=t.name,r=t.triggerUpdate,u=void 0!==r&&r,a=t.onChange,c=void 0===a?function(t,n){}:a,l=t.defaultVal,v=void 0===l?null:l;return function(t){var r=n[e];if(!arguments.length)return r;var a=void 0===t?v:t;return n[e]=a,c.call(o,a,n,r),!i.hasOwnProperty(e)&&(i[e]=r),u&&f(),o}}(t)})),Object.keys(a).forEach((function(t){o[t]=function(){for(var e,r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return(e=a[t]).call.apply(e,[o,n].concat(i))}})),Object.entries(c).forEach((function(t){var n=e(t,2),r=n[0],i=n[1];return o[r]=o[i]})),o.resetProps=function(){return p.forEach((function(t){o[t.name](t.defaultVal)})),o},o.resetProps(),n._rerender=f,o}}}));
{
"name": "kapsule",
"version": "1.14.1",
"version": "1.14.2",
"description": "A closure based Web Component library",

@@ -46,15 +46,15 @@ "type": "module",

"dependencies": {
"debounce": "^1.2.1"
"lodash-es": "4"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.0",
"rimraf": "^4.1.2",
"rollup": "^3.14.0",
"rollup-plugin-dts": "^5.1.1",
"typescript": "^4.9.5"
"rimraf": "^4.4.1",
"rollup": "^3.20.2",
"rollup-plugin-dts": "^5.3.0",
"typescript": "^5.0.3"
},

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

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