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

hyperapp

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperapp - npm Package Compare versions

Comparing version 2.0.0-beta.16 to 2.0.0-beta.17

2

dist/hyperapp.js

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

var hyperapp=function(n){"use strict";var e={},r=[],t=r.map,o=Array.isArray,l=requestAnimationFrame||setTimeout,u=function(n){var e="";if("string"==typeof n)return n;if(o(n)&&n.length>0)for(var r,t=0;t<n.length;t++)""!==(r=u(n[t]))&&(e+=(e&&" ")+r);else for(var t in n)n[t]&&(e+=(e&&" ")+t);return e},i=function(n,e){var r={};for(var t in n)r[t]=n[t];for(var t in e)r[t]=e[t];return r},f=function(n){return n.reduce(function(n,e){return n.concat(!(!e||!0===e)&&("function"==typeof e[0]?[e]:f(e)))},r)},a=function(n,e){return o(n)&&o(e)&&n[0]===e[0]&&"function"==typeof n[0]},c=function(n,e){for(var r in i(n,e)){if(n[r]!==e[r]&&!a(n[r],e[r]))return!0;e[r]=n[r]}},s=function(n,e,r,t,o,l){if("key"===e);else if("style"===e)for(var f in i(r,t))r=null==t||null==t[f]?"":t[f],"-"===f[0]?n[e].setProperty(f,r):n[e][f]=r;else"o"===e[0]&&"n"===e[1]?((n.actions||(n.actions={}))[e=e.slice(2).toLowerCase()]=t)?r||n.addEventListener(e,o):n.removeEventListener(e,o):!l&&"list"!==e&&e in n?n[e]=null==t?"":t:null==t||!1===t||"class"===e&&!(t=u(t))?n.removeAttribute(e):n.setAttribute(e,t)},d=function(n,e,r){var t=3===n.type?document.createTextNode(n.name):(r=r||"svg"===n.name)?document.createElementNS("http://www.w3.org/2000/svg",n.name):document.createElement(n.name),o=n.props;for(var l in o)s(t,l,null,o[l],e,r);for(var u=0,i=n.children.length;u<i;u++)t.appendChild(d(n.children[u]=y(n.children[u]),e,r));return n.node=t},p=function(n){return null==n?null:n.key},v=function(n,e,r,t,o,l){if(r===t);else if(null!=r&&3===r.type&&3===t.type)r.name!==t.name&&(e.nodeValue=t.name);else if(null==r||r.name!==t.name)e=n.insertBefore(d(t=y(t),o,l),e),null!=r&&n.removeChild(r.node);else{var u,f,a,c,h=r.props,m=t.props,g=r.children,w=t.children,z=0,C=0,k=g.length-1,A=w.length-1;for(var L in l=l||"svg"===t.name,i(h,m))("value"===L||"selected"===L||"checked"===L?e[L]:h[L])!==m[L]&&s(e,L,h[L],m[L],o,l);for(;C<=A&&z<=k&&null!=(a=p(g[z]))&&a===p(w[C]);)v(e,g[z].node,g[z],w[C]=y(w[C++],g[z++]),o,l);for(;C<=A&&z<=k&&null!=(a=p(g[k]))&&a===p(w[A]);)v(e,g[k].node,g[k],w[A]=y(w[A--],g[k--]),o,l);if(z>k)for(;C<=A;)e.insertBefore(d(w[C]=y(w[C++]),o,l),(f=g[z])&&f.node);else if(C>A)for(;z<=k;)e.removeChild(g[z++].node);else{L=z;for(var N={},b={};L<=k;L++)null!=(a=g[L].key)&&(N[a]=g[L]);for(;C<=A;)a=p(f=g[z]),c=p(w[C]=y(w[C],f)),b[a]||null!=c&&c===p(g[z+1])?(null==a&&e.removeChild(f.node),z++):null==c||1===r.type?(null==a&&(v(e,f&&f.node,f,w[C],o,l),C++),z++):(a===c?(v(e,f.node,f,w[C],o,l),b[c]=!0,z++):null!=(u=N[c])?(v(e,e.insertBefore(u.node,f&&f.node),u,w[C],o,l),b[c]=!0):v(e,f&&f.node,null,w[C],o,l),C++);for(;z<=k;)null==p(f=g[z++])&&e.removeChild(f.node);for(var L in N)null==b[L]&&e.removeChild(N[L].node)}}return t.node=e},y=function(n,e){return 2===n.type?((!e||function(n,e){for(var r in n)if(n[r]!==e[r])return!0;for(var r in e)if(n[r]!==e[r])return!0}(e.lazy,n.lazy))&&((e=n.lazy.view(n.lazy)).lazy=n.lazy),e):n},h=function(n,e,r,t,o,l){return{name:n,props:e,children:r,node:t,type:l,key:o}},m=function(n,t){return h(n,e,r,t,null,3)},g=function(n){return 3===n.nodeType?m(n.nodeValue,n):h(n.nodeName.toLowerCase(),e,t.call(n.childNodes,g),n,null,1)};return n.Lazy=function(n){return{lazy:n,type:2}},n.h=function(n,r){for(var t,l=[],u=[],i=arguments.length;i-- >2;)l.push(arguments[i]);for(;l.length>0;)if(o(t=l.pop()))for(i=t.length;i-- >0;)l.push(t[i]);else!1===t||!0===t||null==t||u.push("object"==typeof t?t:m(t));return r=r||e,"function"==typeof n?n(r,u):h(n,r,u,null,r.key)},n.app=function(n,e){var r={},t=!1,u=n.view,i=n.node,a=i&&g(i),s=n.subscriptions,d=[],p=function(n){h(this.actions[n.type],n)},y=function(n){return r===n||t||l(w,t=!0),r=n},h=(e||function(n){return n})(function(n,e,t){return"function"==typeof n?h(n(r,e),t||e):o(n)?"function"==typeof n[0]?h(n[0],"function"==typeof(n=n[1])?n(e):n,e):(f(n.slice(1)).map(function(n){n&&n[0](h,n[1],e)},y(n[0])),r):y(n)}),w=function(){t=!1,s&&(d=function(n,e,r){for(var t,o,l=0,u=[];l<n.length||l<e.length;l++)t=n[l],o=e[l],u.push(o?!t||o[0]!==t[0]||c(o[1],t[1])?[o[0],o[1],o[0](r,o[1]),t&&t[2]()]:t:t&&t[2]());return u}(d,f(s(r)),h)),u&&(i=v(i.parentNode,i,a,"string"==typeof(a=u(r))?m(a):a,p))};h(n.init)},n}(exports);
var hyperapp=function(e){"use strict";var n={},r=[],t=r.map,o=Array.isArray,l=requestAnimationFrame||setTimeout,u=function(e){var n="";if("string"==typeof e)return e;if(o(e)&&e.length>0)for(var r,t=0;t<e.length;t++)""!==(r=u(e[t]))&&(n+=(n&&" ")+r);else for(var t in e)e[t]&&(n+=(n&&" ")+t);return n},i=function(e,n){var r={};for(var t in e)r[t]=e[t];for(var t in n)r[t]=n[t];return r},f=function(e){return e.reduce(function(e,n){return e.concat(!(!n||!0===n)&&("function"==typeof n[0]?[n]:f(n)))},r)},a=function(e,n){return o(e)&&o(n)&&e[0]===n[0]&&"function"==typeof e[0]},c=function(e,n){for(var r in i(e,n)){if(e[r]!==n[r]&&!a(e[r],n[r]))return!0;n[r]=e[r]}},s=function(e,n,r,t,o,l){if("key"===n);else if("style"===n)for(var f in i(r,t))r=null==t||null==t[f]?"":t[f],"-"===f[0]?e[n].setProperty(f,r):e[n][f]=r;else"o"===n[0]&&"n"===n[1]?((e.actions||(e.actions={}))[n=n.slice(2).toLowerCase()]=t)?r||e.addEventListener(n,o):e.removeEventListener(n,o):!l&&"list"!==n&&n in e?e[n]=null==t?"":t:null==t||!1===t||"class"===n&&!(t=u(t))?e.removeAttribute(n):e.setAttribute(n,t)},d=function(e,n,r){var t=3===e.type?document.createTextNode(e.name):(r=r||"svg"===e.name)?document.createElementNS("http://www.w3.org/2000/svg",e.name):document.createElement(e.name),o=e.props;for(var l in o)s(t,l,null,o[l],n,r);for(var u=0,i=e.children.length;u<i;u++)t.appendChild(d(e.children[u]=y(e.children[u]),n,r));return e.node=t},p=function(e){return null==e?null:e.key},v=function(e,n,r,t,o,l){if(r===t);else if(null!=r&&3===r.type&&3===t.type)r.name!==t.name&&(n.nodeValue=t.name);else if(null==r||r.name!==t.name)n=e.insertBefore(d(t=y(t),o,l),n),null!=r&&e.removeChild(r.node);else{var u,f,a,c,h=r.props,m=t.props,g=r.children,w=t.children,z=0,C=0,k=g.length-1,A=w.length-1;for(var L in l=l||"svg"===t.name,i(h,m))("value"===L||"selected"===L||"checked"===L?n[L]:h[L])!==m[L]&&s(n,L,h[L],m[L],o,l);for(;C<=A&&z<=k&&null!=(a=p(g[z]))&&a===p(w[C]);)v(n,g[z].node,g[z],w[C]=y(w[C++],g[z++]),o,l);for(;C<=A&&z<=k&&null!=(a=p(g[k]))&&a===p(w[A]);)v(n,g[k].node,g[k],w[A]=y(w[A--],g[k--]),o,l);if(z>k)for(;C<=A;)n.insertBefore(d(w[C]=y(w[C++]),o,l),(f=g[z])&&f.node);else if(C>A)for(;z<=k;)n.removeChild(g[z++].node);else{L=z;for(var N={},b={};L<=k;L++)null!=(a=g[L].key)&&(N[a]=g[L]);for(;C<=A;)a=p(f=g[z]),c=p(w[C]=y(w[C],f)),b[a]||null!=c&&c===p(g[z+1])?(null==a&&n.removeChild(f.node),z++):null==c||1===r.type?(null==a&&(v(n,f&&f.node,f,w[C],o,l),C++),z++):(a===c?(v(n,f.node,f,w[C],o,l),b[c]=!0,z++):null!=(u=N[c])?(v(n,n.insertBefore(u.node,f&&f.node),u,w[C],o,l),b[c]=!0):v(n,f&&f.node,null,w[C],o,l),C++);for(;z<=k;)null==p(f=g[z++])&&n.removeChild(f.node);for(var L in N)null==b[L]&&n.removeChild(N[L].node)}}return t.node=n},y=function(e,n){return 2===e.type?((!n||function(e,n){for(var r in e)if(e[r]!==n[r])return!0;for(var r in n)if(e[r]!==n[r])return!0}(n.lazy,e.lazy))&&((n=e.lazy.view(e.lazy)).lazy=e.lazy),n):e},h=function(e,n,r,t,o,l){return{name:e,props:n,children:r,node:t,type:l,key:o}},m=function(e,t){return h(e,n,r,t,null,3)},g=function(e){return 3===e.nodeType?m(e.nodeValue,e):h(e.nodeName.toLowerCase(),n,t.call(e.childNodes,g),e,null,1)};return e.Lazy=function(e){return{lazy:e,type:2}},e.h=function(e,r){for(var t,l=[],u=[],i=arguments.length;i-- >2;)l.push(arguments[i]);for(;l.length>0;)if(o(t=l.pop()))for(i=t.length;i-- >0;)l.push(t[i]);else!1===t||!0===t||null==t||u.push("object"==typeof t?t:m(t));return r=r||n,"function"==typeof e?e(r,u):h(e,r,u,null,r.key)},e.app=function(e,n){var r={},t=!1,u=e.view,i=e.node,a=i&&g(i),s=e.subscriptions,d=[],p=function(e){h(this.actions[e.type],e)},y=function(e){return r===e||t||l(w,t=!0),r=e},h=(n||function(e){return e})(function(e,n,t){return"function"==typeof e?h(e(r,n),t||n):o(e)?"function"==typeof e[0]?h(e[0],"function"==typeof(e=e[1])?e(n):e,n):(f(e.slice(1)).map(function(e){e&&e[0](h,e[1],n)},y(e[0])),r):y(e)}),w=function(){t=!1,s&&(d=function(e,n,r){for(var t,o,l=0,u=[];l<e.length||l<n.length;l++)t=e[l],o=n[l],u.push(o?!t||o[0]!==t[0]||c(o[1],t[1])?[o[0],o[1],o[0](r,o[1]),t&&t[2]()]:t:t&&t[2]());return u}(d,f(s(r)),h)),u&&(i=v(i.parentNode,i,a,"string"==typeof(a=u(r))?m(a):a,p))};h(e.init)},e}("undefined"==typeof exports?{}:exports);
//# sourceMappingURL=hyperapp.js.map
{
"name": "hyperapp",
"description": "JavaScript micro-framework for building web interfaces.",
"version": "2.0.0-beta.16",
"version": "2.0.0-beta.17",
"main": "dist/hyperapp.js",

@@ -24,7 +24,7 @@ "module": "src/index.js",

"test": "exit 0",
"build": "export dir=${pkg:+lib/$pkg/} pkg=$npm_package_name$pkg; npm run bundle && npm run minify && npm run nodeify",
"build": "export dir=${pkg:+lib/$pkg/} pkg=$npm_package_name$pkg; npm run bundle && npm run nodeify && npm run minify",
"bundle": "rollup -i ${dir}$npm_package_module -o ${dir}dist/$pkg.js --no-esModule -m -f iife -n $pkg",
"minify": "terser ${dir}dist/$pkg.js -o ${dir}dist/$pkg.js -mc --source-map includeSources,url=$pkg.js.map",
"create": "npm run build && git commit -am $msg && git tag -s $msg -m $msg && git push && git push --tags",
"nodeify": "for file in ${dir}dist/$pkg.js{,.map}; do perl -pi -e \"s,\\({}\\),(exports),\" $file; done",
"nodeify": "perl -pi -e \"s,\\({}\\),(typeof exports=='undefined'?{}:exports),\" ${dir}dist/$pkg.js",
"release": "env msg=$(npm run -s message) npm run create && cd ./${pkg:+lib/$pkg} && npm publish --access public",

@@ -31,0 +31,0 @@ "message": "echo ${pkg:+@$npm_package_name/$pkg@}$(node -p \"require('./${pkg:+lib/$pkg/}package').version\")"

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