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.4 to 1.14.5

2

dist/kapsule.d.ts

@@ -47,2 +47,2 @@ type InitOptions = object;

export { KapsuleCfg, KapsuleClosure, KapsuleInstance, Kapsule as default };
export { type KapsuleCfg, type KapsuleClosure, type KapsuleInstance, Kapsule as default };

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

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

@@ -8,27 +8,27 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

function _iterableToArrayLimit(arr, i) {
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
if (null != _i) {
var _s,
_e,
_x,
_r,
_arr = [],
_n = !0,
_d = !1;
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (_x = (_i = _i.call(arr)).next, 0 === i) {
if (Object(_i) !== _i) return;
_n = !1;
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
} catch (err) {
_d = !0, _e = err;
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
} finally {
if (_d) throw _e;
if (o) throw n;
}
}
return _arr;
return a;
}

@@ -95,2 +95,32 @@ }

/**
* 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');
}
/** Detect free variable `global` from Node.js. */

@@ -109,2 +139,58 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

/**
* 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;
/** 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;
}
/** Built-in value references. */

@@ -255,66 +341,2 @@ var Symbol$1 = root$1.Symbol;

/** 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. */

@@ -379,24 +401,2 @@ var NAN = 0 / 0;

/**
* 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. */

@@ -403,0 +403,0 @@ var FUNC_ERROR_TEXT = 'Expected a function';

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

// Version 1.14.4 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}}}));
// Version 1.14.5 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}function i(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}var o="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,a=o||u||Function("return this")(),f=function(){return a.Date.now()},c=/\s/;var l=/^\s+/;function v(t){return t?t.slice(0,function(t){for(var n=t.length;n--&&c.test(t.charAt(n)););return n}(t)+1).replace(l,""):t}var s=a.Symbol,d=Object.prototype,p=d.hasOwnProperty,y=d.toString,b=s?s.toStringTag:void 0;var g=Object.prototype.toString;var h="[object Null]",m="[object Undefined]",j=s?s.toStringTag:void 0;function O(t){return null==t?void 0===t?m:h:j&&j in Object(t)?function(t){var n=p.call(t,b),e=t[b];try{t[b]=void 0;var r=!0}catch(t){}var i=y.call(t);return r&&(n?t[b]=e:delete t[b]),i}(t):function(t){return g.call(t)}(t)}var w="[object Symbol]";var S=NaN,T=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,x=/^0o[0-7]+$/i,A=parseInt;function P(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&O(t)==w}(t))return S;if(i(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=i(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=v(t);var e=E.test(t);return e||x.test(t)?A(t.slice(2),e?2:8):T.test(t)?S:+t}var C="Expected a function",I=Math.max,U=Math.min;function N(t,n,e){var r,o,u,a,c,l,v=0,s=!1,d=!1,p=!0;if("function"!=typeof t)throw new TypeError(C);function y(n){var e=r,i=o;return r=o=void 0,v=n,a=t.apply(i,e)}function b(t){var e=t-l;return void 0===l||e>=n||e<0||d&&t-v>=u}function g(){var t=f();if(b(t))return h(t);c=setTimeout(g,function(t){var e=n-(t-l);return d?U(e,u-(t-v)):e}(t))}function h(t){return c=void 0,p&&r?y(t):(r=o=void 0,a)}function m(){var t=f(),e=b(t);if(r=arguments,o=this,l=t,e){if(void 0===c)return function(t){return v=t,c=setTimeout(g,n),s?y(t):a}(l);if(d)return clearTimeout(c),c=setTimeout(g,n),y(l)}return void 0===c&&(c=setTimeout(g,n)),a}return n=P(n)||0,i(e)&&(s=!!e.leading,u=(d="maxWait"in e)?I(P(e.maxWait)||0,n):u,p="trailing"in e?!!e.trailing:p),m.cancel=function(){void 0!==c&&clearTimeout(c),v=0,r=l=o=c=void 0},m.flush=function(){return void 0===c?a:h(f())},m}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.4",
"version": "1.14.5",
"description": "A closure based Web Component library",

@@ -49,12 +49,12 @@ "type": "module",

"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.2",
"rimraf": "^5.0.0",
"rollup": "^3.22.0",
"rollup-plugin-dts": "^5.3.0",
"typescript": "^5.0.4"
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"rimraf": "^5.0.5",
"rollup": "^4.1.4",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^5.2.2"
},

@@ -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