Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

preact

Package Overview
Dependencies
Maintainers
1
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2

12

dist/preact.js

@@ -14,2 +14,3 @@ (function (global, factory) {

};
var ATTR_PREFIX = '__preactattr_';
var HAS_DOM = typeof document !== 'undefined';

@@ -819,4 +820,9 @@ var EMPTY = {};

var len = node.attributes && node.attributes.length;
if (len) for (var i = len; i--;) {
node.removeAttribute(node.attributes[i].name);
if (len) {
for (var i = len; i--;) {
var _name3 = node.attributes[i].name;
delete node['' + ATTR_PREFIX + _name3];
node.removeAttribute(_name3);
}
}

@@ -889,3 +895,3 @@

function setAccessor(node, name, value, old) {
var key = '__preactattr_' + name;
var key = '' + ATTR_PREFIX + name;
if (node[key] === value) return;

@@ -892,0 +898,0 @@ node[key] = value;

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.preact={})}(this,function(e){"use strict";function n(e,n){var t=arguments.length<=2||void 0===arguments[2]?null:arguments[2],o=t&&t._component&&t._componentConstructor===e.nodeName,i=h(t,e),a=!o&&i._component;return a&&r(a,"componentWillMount"),h.parentNode!==n&&n.appendChild(i),a&&r(a,"componentDidMount"),i}function t(e,n){for(var t=arguments.length,r=Array(t>2?t-2:0),c=2;t>c;c++)r[c-2]=arguments[c];var s=void 0,l=[],u=r.length,d=void 0,p=void 0;if(u){s=[];for(var f=0;u>f;f++){var m=r[f];if(!a(m)){m.join?d=m:(d=l,d[0]=m);for(var v=0;v<d.length;v++){var h=d[v],y=!a(h)&&!i(h);y&&(h=String(h)),y&&p?s[s.length-1]+=h:a(h)||s.push(h),p=y}}}}n&&n.children&&delete n.children;var g=new B(e,n||void 0,s||void 0);return o(G,"vnode",g),g}function o(e,n){for(var t=e[n],o=arguments.length,r=Array(o>2?o-2:0),i=2;o>i;i++)r[i-2]=arguments[i];return t&&"function"==typeof t?t.apply(e,r):void 0}function r(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;n>r;r++)t[r-1]=arguments[r];do o.apply(void 0,[e].concat(t));while(e=e._component)}function i(e){return e&&e.__isVNode===!0}function a(e){return null===e||void 0===e}function c(e,n){if(3===e.nodeType)return"string"==typeof n;if(s(n))return!0;var t=n.nodeName;return"function"==typeof t?e._componentConstructor===t:e.nodeName.toLowerCase()===t}function s(e){var n=e.nodeName;return"function"==typeof n&&!n.prototype.render}function l(e){return e.nodeName(w(e))||z}function u(e){e._dirty||(e._dirty=!0,H.add(e))}function d(e,n){var t=arguments.length<=2||void 0===arguments[2]?P:arguments[2],r=e._disableRendering;e._disableRendering=!0,o(e,"componentWillReceiveProps",n,e.props),e.nextProps=n,e._disableRendering=r,t.render!==!1&&(t.renderSync||I.syncComponentUpdates?p(e):u(e))}function p(e,n){if(!e._disableRendering){e._dirty=!1;var t=e.nextProps,i=e.state;if(e.base){if(o(e,"shouldComponentUpdate",t,i)===!1)return void(e.props=t);o(e,"componentWillUpdate",t,i)}e.props=t;var a=o(e,"render",t,i),c=a&&a.nodeName,s=void 0;if("function"==typeof c&&c.prototype.render){var l=e._component;l&&l.constructor!==c&&(v(l.base,l,!1),l=null);var u=w(a);l?d(l,u,O):(l=J.create(c,u),l._parentComponent=e,e._component=l,e.base&&r(l,"componentWillMount"),d(l,u,W),p(l,R),e.base&&r(l,"componentDidMount")),s=l.base}else e._component&&v(e.base,e._component),e._component=null,(e.base||n&&n.build)&&(s=h(e.base,a||z,e));if(e.base&&s!==e.base){var f=e.base.parentNode;f&&f.replaceChild(s,e.base)}return e.base=s,s&&(s._component=e,s._componentConstructor=e.constructor),o(e,"componentDidUpdate",t,i),a}}function f(e,n){var t=e&&e._component;if(s(n)){var o=h(e,l(n));return o._componentConstructor=n.nodeName,o}for(var r=t&&e._componentConstructor===n.nodeName;t&&!r&&(t=t._parentComponent);)r=t.constructor===n.nodeName;return r?d(t,w(n),O):(t&&v(e,t),e=m(n)),e}function m(e){var n=w(e),t=J.create(e.nodeName,n);return d(t,n,W),p(t,R),t.base}function v(e,n,t){if(o(n,"componentWillUnmount"),t!==!1){e._component===n&&(delete e._component,delete e._componentConstructor);var r=n.base;r&&r.parentNode&&r.parentNode.removeChild(r)}n._parentComponent=null,o(n,"componentDidUnmount"),J.collect(n)}function h(e,n){var t=e,i=n.nodeName;if("function"!=typeof i||i.prototype.render||(n=l(n),i=n.nodeName),"function"==typeof i)return f(e,n);if("string"==typeof n){if(e){if(3===e.nodeType)return e[L]=n,e;1===e.nodeType&&q.collect(e)}return document.createTextNode(n)}(null===i||void 0===i)&&(i="x-undefined-element"),e?e.nodeName.toLowerCase()!==i&&(t=q.create(i),g(t,j(e.childNodes)),1===e.nodeType&&q.collect(e)):t=q.create(i);var a=x(t)||P,s=n.attributes||P;if(a!==P)for(var u in a)if(E.call(a,u)){var d=s[u];(void 0===d||null===d)&&b(t,u,null,a[u])}if(s!==P)for(var p in s)if(E.call(s,p)){var m=s[p];if(void 0!==m&&null!==m){var v=_(t,p,a[p]);m!==v&&b(t,p,m,v)}}for(var y=j(t.childNodes),C={},N=y.length;N--;){var k=y[N].nodeType,w=void 0;if(3===k)w=k.key;else{if(1!==k)continue;w=y[N].getAttribute("key")}w&&(C[w]=y.splice(N,1)[0])}var T=[];if(n.children)for(var N=0,U=n.children.length;U>N;N++){var S=n.children[N],A=S.attributes,w=void 0,D=void 0;if(A&&(w=A.key,D=w&&C[w]),!D){var W=y.length;if(y.length)for(var O=0;W>O;O++)if(c(y[O],S)){D=y.splice(O,1)[0];break}}T.push(h(D,S))}for(var N=0,W=T.length;W>N;N++)if(t.childNodes[N]!==T[N]){var D=T[N],R=D._component,z=t.childNodes[N+1];R&&r(R,"componentWillMount"),z?t.insertBefore(D,z):t.appendChild(D),R&&r(R,"componentDidMount")}for(var N=0,W=y.length;W>N;N++){var D=y[N],R=D._component;R&&o(R,"componentWillUnmount"),D.parentNode.removeChild(D),R?(o(R,"componentDidUnmount"),J.collect(R)):1===D.nodeType&&q.collect(D)}return t}function y(e,n,t){var o=n.split("."),r=o[0];return function(n){var i,c=this,s=e.state,l=void 0,u=void 0;for("string"==typeof t?(l=F(n,t),a(l)&&(c=c._component)&&(l=F(c,t))):l=(c.nodeName+c.type).match(/^input(checkbox|radio)$/i)?c.checked:c.value,"function"==typeof l&&(l=l.call(c)),u=0;u<o.length-1;u++)s=s[o[u]]||{};s[o[u]]=l,e.setState((i={},i[r]=e.state[r],i))}}function g(e,n){var t=n.length;if(2>=t)return e.appendChild(n[0]),void(2===t&&e.appendChild(n[1]));for(var o=document.createDocumentFragment(),r=0;t>r;r++)o.appendChild(n[r]);e.appendChild(o)}function _(e,n,t){return"class"===n?e.className:"style"===n?e.style.cssText:"type"!==n&&n in e?e[n]:t}function b(e,n,t,o){var r="__preactattr_"+n;e[r]!==t&&(e[r]=t,"class"===n?e.className=t:"style"===n?e.style.cssText=t:n in e&&"type"!==n?e[n]=t:C(e,n,t,o))}function C(e,n,t,o){if("on"===n.substring(0,2)){var r=K(n),i=e._listeners||(e._listeners={});return i[r]||e.addEventListener(r,N),void(i[r]=t)}var a=typeof t;null===t?e.removeAttribute(n):"function"!==a&&"object"!==a&&e.setAttribute(n,t)}function N(e){var n=this._listeners[K(e.type)];return n?n.call(this,o(G,"event",e)||e):void 0}function x(e){var n=e.attributes;return n&&n.getNamedItem?n.length?k(n):void 0:n}function k(e){for(var n={},t=e.length;t--;){var o=e[t];n[o.name]=o.value}return n}function w(e){var n=S({},e.attributes);return e.children&&(n.children=e.children),n}function T(e){var n="",t=": ",o="; ";for(var r in e)if(E.call(e,r)){var i=e[r];n+=Q(r),n+=t,n+=i,"number"!=typeof i||E.call(M,r)||(n+="px"),n+=o}return n}function U(e){var n="";for(var t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function S(e,n){for(var t in n)E.call(n,t)&&(e[t]=n[t]);return e}var A={};A.classCallCheck=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")};var D="undefined"!=typeof document,P={},W={render:!1},O={renderSync:!0},R={build:!0},z="",L=!D||"textContent"in document?"textContent":"nodeValue",M={boxFlex:1,boxFlexGroup:1,columnCount:1,fillOpacity:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,strokeOpacity:1,widows:1,zIndex:1,zoom:1},j=function(e){for(var n=[],t=e.length;t--;)n[t]=e[t];return n},E=Object.prototype.hasOwnProperty,V=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(t){return E.call(n,t)?n[t]:n[t]=e(t)}},F=function(e,n){return n.split(".").map(function(n){return e=e&&e[n]}),e},I={syncComponentUpdates:!0},G={vnode:function(e){var n=e.attributes;if(n){var t=n.style;t&&!t.substring&&(n.style=T(t));var o=n["class"];E.call(n,"className")&&(o=n["class"]=n.className,delete n.className),o&&!o.substring&&(n["class"]=U(o))}}},$=function(){function e(){A.classCallCheck(this,e),this._dirty=this._disableRendering=!1,this._linkedStates={},this.nextProps=this.base=null,this.props=o(this,"getDefaultProps")||{},this.state=o(this,"getInitialState")||{},o(this,"initialize")}return e.prototype.shouldComponentUpdate=function(e,n){return!0},e.prototype.linkState=function(e,n){var t=this._linkedStates,o=e+"|"+(n||"");return t[o]||(t[o]=y(this,e,n))},e.prototype.setState=function(e){S(this.state,e),u(this)},e.prototype.setProps=function(e,n){return d(this,e,n)},e.prototype.render=function(e){return t("div",null,e.children)},e}(),B=function Y(e,n,t){A.classCallCheck(this,Y),this.nodeName=e,this.attributes=n,this.children=t};B.prototype.__isVNode=!0;var H={items:[],itemsOffline:[],add:function(e){if(1===H.items.push(e)){var n=G.debounceRendering;n?n(H.process):setTimeout(H.process,0)}},process:function(){var e=H.items,n=e.length;if(n)for(H.items=H.itemsOffline,H.items.length=0,H.itemsOffline=e;n--;)e[n]._dirty&&p(e[n])}},Z=H.process,q={nodes:{},normalizeName:V(function(e){return e.toUpperCase()}),collect:function(e){q.clean(e);var n=q.normalizeName(e.nodeName),t=q.nodes[n];t?t.push(e):q.nodes[n]=[e]},create:function(e){var n=q.normalizeName(e),t=q.nodes[n];return t&&t.pop()||document.createElement(e)},clean:function(e){if(e.parentNode&&e.parentNode.removeChild(e),3!==e.nodeType){delete e._component,delete e._componentConstructor;var n=e._listeners;if(delete e._listeners,n)for(var t in n)E.call(n,t)&&e.removeEventListener(t,N);var o=e.attributes&&e.attributes.length;if(o)for(var t=o;t--;)e.removeAttribute(e.attributes[t].name)}}},J={components:{},collect:function(e){var n=e.constructor.name,t=J.components[n];t?t.push(e):J.components[n]=[e]},create:function(e,n){var t=J.components[e.name];if(t&&t.length)for(var o=t.length;o--;)if(t[o].constructor===e)return t.splice(o,1)[0];return new e(n)}},K=V(function(e){return e.replace(/^on/i,"").toLowerCase()}),Q=V(function(e){return e.replace(/([A-Z])/,"-$1").toLowerCase()}),X={options:I,hooks:G,render:n,rerender:Z,h:t,Component:$};e.render=n,e.h=t,e.Component=$,e.VNode=B,e.options=I,e.hooks=G,e.rerender=Z,e["default"]=X});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.preact={})}(this,function(e){"use strict";function n(e,n){var t=arguments.length<=2||void 0===arguments[2]?null:arguments[2],o=t&&t._component&&t._componentConstructor===e.nodeName,i=h(t,e),a=!o&&i._component;return a&&r(a,"componentWillMount"),h.parentNode!==n&&n.appendChild(i),a&&r(a,"componentDidMount"),i}function t(e,n){for(var t=arguments.length,r=Array(t>2?t-2:0),c=2;t>c;c++)r[c-2]=arguments[c];var s=void 0,l=[],u=r.length,d=void 0,p=void 0;if(u){s=[];for(var f=0;u>f;f++){var m=r[f];if(!a(m)){m.join?d=m:(d=l,d[0]=m);for(var v=0;v<d.length;v++){var h=d[v],y=!a(h)&&!i(h);y&&(h=String(h)),y&&p?s[s.length-1]+=h:a(h)||s.push(h),p=y}}}}n&&n.children&&delete n.children;var g=new H(e,n||void 0,s||void 0);return o($,"vnode",g),g}function o(e,n){for(var t=e[n],o=arguments.length,r=Array(o>2?o-2:0),i=2;o>i;i++)r[i-2]=arguments[i];return t&&"function"==typeof t?t.apply(e,r):void 0}function r(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;n>r;r++)t[r-1]=arguments[r];do o.apply(void 0,[e].concat(t));while(e=e._component)}function i(e){return e&&e.__isVNode===!0}function a(e){return null===e||void 0===e}function c(e,n){if(3===e.nodeType)return"string"==typeof n;if(s(n))return!0;var t=n.nodeName;return"function"==typeof t?e._componentConstructor===t:e.nodeName.toLowerCase()===t}function s(e){var n=e.nodeName;return"function"==typeof n&&!n.prototype.render}function l(e){return e.nodeName(w(e))||L}function u(e){e._dirty||(e._dirty=!0,Z.add(e))}function d(e,n){var t=arguments.length<=2||void 0===arguments[2]?W:arguments[2],r=e._disableRendering;e._disableRendering=!0,o(e,"componentWillReceiveProps",n,e.props),e.nextProps=n,e._disableRendering=r,t.render!==!1&&(t.renderSync||G.syncComponentUpdates?p(e):u(e))}function p(e,n){if(!e._disableRendering){e._dirty=!1;var t=e.nextProps,i=e.state;if(e.base){if(o(e,"shouldComponentUpdate",t,i)===!1)return void(e.props=t);o(e,"componentWillUpdate",t,i)}e.props=t;var a=o(e,"render",t,i),c=a&&a.nodeName,s=void 0;if("function"==typeof c&&c.prototype.render){var l=e._component;l&&l.constructor!==c&&(v(l.base,l,!1),l=null);var u=w(a);l?d(l,u,R):(l=K.create(c,u),l._parentComponent=e,e._component=l,e.base&&r(l,"componentWillMount"),d(l,u,O),p(l,z),e.base&&r(l,"componentDidMount")),s=l.base}else e._component&&v(e.base,e._component),e._component=null,(e.base||n&&n.build)&&(s=h(e.base,a||L,e));if(e.base&&s!==e.base){var f=e.base.parentNode;f&&f.replaceChild(s,e.base)}return e.base=s,s&&(s._component=e,s._componentConstructor=e.constructor),o(e,"componentDidUpdate",t,i),a}}function f(e,n){var t=e&&e._component;if(s(n)){var o=h(e,l(n));return o._componentConstructor=n.nodeName,o}for(var r=t&&e._componentConstructor===n.nodeName;t&&!r&&(t=t._parentComponent);)r=t.constructor===n.nodeName;return r?d(t,w(n),R):(t&&v(e,t),e=m(n)),e}function m(e){var n=w(e),t=K.create(e.nodeName,n);return d(t,n,O),p(t,z),t.base}function v(e,n,t){if(o(n,"componentWillUnmount"),t!==!1){e._component===n&&(delete e._component,delete e._componentConstructor);var r=n.base;r&&r.parentNode&&r.parentNode.removeChild(r)}n._parentComponent=null,o(n,"componentDidUnmount"),K.collect(n)}function h(e,n){var t=e,i=n.nodeName;if("function"!=typeof i||i.prototype.render||(n=l(n),i=n.nodeName),"function"==typeof i)return f(e,n);if("string"==typeof n){if(e){if(3===e.nodeType)return e[M]=n,e;1===e.nodeType&&J.collect(e)}return document.createTextNode(n)}(null===i||void 0===i)&&(i="x-undefined-element"),e?e.nodeName.toLowerCase()!==i&&(t=J.create(i),g(t,E(e.childNodes)),1===e.nodeType&&J.collect(e)):t=J.create(i);var a=x(t)||W,s=n.attributes||W;if(a!==W)for(var u in a)if(V.call(a,u)){var d=s[u];(void 0===d||null===d)&&b(t,u,null,a[u])}if(s!==W)for(var p in s)if(V.call(s,p)){var m=s[p];if(void 0!==m&&null!==m){var v=_(t,p,a[p]);m!==v&&b(t,p,m,v)}}for(var y=E(t.childNodes),C={},N=y.length;N--;){var k=y[N].nodeType,w=void 0;if(3===k)w=k.key;else{if(1!==k)continue;w=y[N].getAttribute("key")}w&&(C[w]=y.splice(N,1)[0])}var T=[];if(n.children)for(var N=0,U=n.children.length;U>N;N++){var S=n.children[N],A=S.attributes,w=void 0,D=void 0;if(A&&(w=A.key,D=w&&C[w]),!D){var P=y.length;if(y.length)for(var O=0;P>O;O++)if(c(y[O],S)){D=y.splice(O,1)[0];break}}T.push(h(D,S))}for(var N=0,P=T.length;P>N;N++)if(t.childNodes[N]!==T[N]){var D=T[N],R=D._component,z=t.childNodes[N+1];R&&r(R,"componentWillMount"),z?t.insertBefore(D,z):t.appendChild(D),R&&r(R,"componentDidMount")}for(var N=0,P=y.length;P>N;N++){var D=y[N],R=D._component;R&&o(R,"componentWillUnmount"),D.parentNode.removeChild(D),R?(o(R,"componentDidUnmount"),K.collect(R)):1===D.nodeType&&J.collect(D)}return t}function y(e,n,t){var o=n.split("."),r=o[0];return function(n){var i,c=this,s=e.state,l=void 0,u=void 0;for("string"==typeof t?(l=I(n,t),a(l)&&(c=c._component)&&(l=I(c,t))):l=(c.nodeName+c.type).match(/^input(checkbox|radio)$/i)?c.checked:c.value,"function"==typeof l&&(l=l.call(c)),u=0;u<o.length-1;u++)s=s[o[u]]||{};s[o[u]]=l,e.setState((i={},i[r]=e.state[r],i))}}function g(e,n){var t=n.length;if(2>=t)return e.appendChild(n[0]),void(2===t&&e.appendChild(n[1]));for(var o=document.createDocumentFragment(),r=0;t>r;r++)o.appendChild(n[r]);e.appendChild(o)}function _(e,n,t){return"class"===n?e.className:"style"===n?e.style.cssText:"type"!==n&&n in e?e[n]:t}function b(e,n,t,o){var r=""+D+n;e[r]!==t&&(e[r]=t,"class"===n?e.className=t:"style"===n?e.style.cssText=t:n in e&&"type"!==n?e[n]=t:C(e,n,t,o))}function C(e,n,t,o){if("on"===n.substring(0,2)){var r=Q(n),i=e._listeners||(e._listeners={});return i[r]||e.addEventListener(r,N),void(i[r]=t)}var a=typeof t;null===t?e.removeAttribute(n):"function"!==a&&"object"!==a&&e.setAttribute(n,t)}function N(e){var n=this._listeners[Q(e.type)];return n?n.call(this,o($,"event",e)||e):void 0}function x(e){var n=e.attributes;return n&&n.getNamedItem?n.length?k(n):void 0:n}function k(e){for(var n={},t=e.length;t--;){var o=e[t];n[o.name]=o.value}return n}function w(e){var n=S({},e.attributes);return e.children&&(n.children=e.children),n}function T(e){var n="",t=": ",o="; ";for(var r in e)if(V.call(e,r)){var i=e[r];n+=X(r),n+=t,n+=i,"number"!=typeof i||V.call(j,r)||(n+="px"),n+=o}return n}function U(e){var n="";for(var t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function S(e,n){for(var t in n)V.call(n,t)&&(e[t]=n[t]);return e}var A={};A.classCallCheck=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")};var D="__preactattr_",P="undefined"!=typeof document,W={},O={render:!1},R={renderSync:!0},z={build:!0},L="",M=!P||"textContent"in document?"textContent":"nodeValue",j={boxFlex:1,boxFlexGroup:1,columnCount:1,fillOpacity:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,strokeOpacity:1,widows:1,zIndex:1,zoom:1},E=function(e){for(var n=[],t=e.length;t--;)n[t]=e[t];return n},V=Object.prototype.hasOwnProperty,F=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(t){return V.call(n,t)?n[t]:n[t]=e(t)}},I=function(e,n){return n.split(".").map(function(n){return e=e&&e[n]}),e},G={syncComponentUpdates:!0},$={vnode:function(e){var n=e.attributes;if(n){var t=n.style;t&&!t.substring&&(n.style=T(t));var o=n["class"];V.call(n,"className")&&(o=n["class"]=n.className,delete n.className),o&&!o.substring&&(n["class"]=U(o))}}},B=function(){function e(){A.classCallCheck(this,e),this._dirty=this._disableRendering=!1,this._linkedStates={},this.nextProps=this.base=null,this.props=o(this,"getDefaultProps")||{},this.state=o(this,"getInitialState")||{},o(this,"initialize")}return e.prototype.shouldComponentUpdate=function(e,n){return!0},e.prototype.linkState=function(e,n){var t=this._linkedStates,o=e+"|"+(n||"");return t[o]||(t[o]=y(this,e,n))},e.prototype.setState=function(e){S(this.state,e),u(this)},e.prototype.setProps=function(e,n){return d(this,e,n)},e.prototype.render=function(e){return t("div",null,e.children)},e}(),H=function ee(e,n,t){A.classCallCheck(this,ee),this.nodeName=e,this.attributes=n,this.children=t};H.prototype.__isVNode=!0;var Z={items:[],itemsOffline:[],add:function(e){if(1===Z.items.push(e)){var n=$.debounceRendering;n?n(Z.process):setTimeout(Z.process,0)}},process:function(){var e=Z.items,n=e.length;if(n)for(Z.items=Z.itemsOffline,Z.items.length=0,Z.itemsOffline=e;n--;)e[n]._dirty&&p(e[n])}},q=Z.process,J={nodes:{},normalizeName:F(function(e){return e.toUpperCase()}),collect:function(e){J.clean(e);var n=J.normalizeName(e.nodeName),t=J.nodes[n];t?t.push(e):J.nodes[n]=[e]},create:function(e){var n=J.normalizeName(e),t=J.nodes[n];return t&&t.pop()||document.createElement(e)},clean:function(e){if(e.parentNode&&e.parentNode.removeChild(e),3!==e.nodeType){delete e._component,delete e._componentConstructor;var n=e._listeners;if(delete e._listeners,n)for(var t in n)V.call(n,t)&&e.removeEventListener(t,N);var o=e.attributes&&e.attributes.length;if(o)for(var t=o;t--;){var r=e.attributes[t].name;delete e[""+D+r],e.removeAttribute(r)}}}},K={components:{},collect:function(e){var n=e.constructor.name,t=K.components[n];t?t.push(e):K.components[n]=[e]},create:function(e,n){var t=K.components[e.name];if(t&&t.length)for(var o=t.length;o--;)if(t[o].constructor===e)return t.splice(o,1)[0];return new e(n)}},Q=F(function(e){return e.replace(/^on/i,"").toLowerCase()}),X=F(function(e){return e.replace(/([A-Z])/,"-$1").toLowerCase()}),Y={options:G,hooks:$,render:n,rerender:q,h:t,Component:B};e.render=n,e.h=t,e.Component=B,e.VNode=H,e.options=G,e.hooks=$,e.rerender=q,e["default"]=Y});
//# sourceMappingURL=preact.min.js.map
{
"name": "preact",
"amdName": "preact",
"version": "2.7.1",
"version": "2.7.2",
"description": "Tiny & fast Component-based virtual DOM framework.",

@@ -6,0 +6,0 @@ "main": "dist/preact.js",

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

const ATTR_PREFIX = '__preactattr_';
const HAS_DOM = typeof document!=='undefined';

@@ -817,4 +818,8 @@ const EMPTY = {};

let len = node.attributes && node.attributes.length;
if (len) for (let i=len; i--; ) {
node.removeAttribute(node.attributes[i].name);
if (len) {
for (let i=len; i--; ) {
let { name } = node.attributes[i];
delete node[`${ATTR_PREFIX}${name}`];
node.removeAttribute(name);
}
}

@@ -895,3 +900,3 @@

function setAccessor(node, name, value, old) {
let key = `__preactattr_${name}`;
let key = `${ATTR_PREFIX}${name}`;
if (node[key]===value) return;

@@ -898,0 +903,0 @@ node[key] = value;

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