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

literaljs

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

literaljs - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

2

build/index.js

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

var e,t,n,r={},i="eid",o=[],f={},u=[],d=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",s="boolean",v="undefined",p="object",l="function",h="events",y="style",m="value";function g(e){return Array.isArray(e)}function b(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function E(e,t){for(var n=0,r=t.length;n<r;n++)g(t[n])?E(e,t[n]):e.push(t[n]);return e}function L(e,t){for(var n in t)e[n]=t[n];return e}function _(e,t,n){return L(L(e,t),n)}function A(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return{e:e,a:L({},t),c:E([],n)}}function C(i,o,f){void 0===f&&(f={}),r=_({},r,f),t=i,e=document.getElementById(o),n=j(i()),J(e,n),D(),window.addEventListener("__LITERAL_LIFECYCLE__",D)}function w(e){void 0===e&&(e={});var t=e.mounted;void 0===t&&(t=function(){});var n=e.updated;void 0===n&&(n=function(){});var r=e.unmounted;void 0===r&&(r=function(){});var i=e.methods;void 0===i&&(i=function(){});var o=e.render;void 0===o&&(o=function(){});var f=b();return function(e){return void 0===e&&(e={}),{id:f,init:function(){return this.id=f,this.props=e,this.getState=N,this.setState=O,this.mounted=t.bind(this),this.updated=n.bind(this),this.unmounted=r.bind(this),function(e,t){for(var n in typeof t===l&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,i),this.render=o.bind(this),this}}}}function N(){return r}function O(i){var o,f;r=_({},r,i),o=L({},n),f=j(t()),n=f,function e(t,n,r,i){var o=typeof n,f=typeof r,u=t.childNodes[i];if(f===v)J(t,n);else if(o===v)Y(r),function(e,t){e.removeChild(t)}(t,u);else if(R(r,n,o))F(t,u,n);else if(R(n,r,f))Y(r),F(t,u,n);else if(function(e,t,n,r){return n!==r||(n===a||n===c)&&e!==t||e.e!==t.e||e.id!==t.id}(n,r,o,f))Y(r),F(t,u,n);else if(typeof n.e===a){var d;!function(e,t,n){M(t,"up");for(var r,i,o=Object.keys(t.a),f=o.length;f--;)if(i=t.a[o[f]],r=n.a[o[f]],o[f]===y){if(c=typeof(d=r),(a=typeof(u=i))===p&&c===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),I(i,e)}else o[f]===h?(B(e,n.eid),z(n.eid),t.eid=b(),x(t.eid,i,e)):o[f]===m&&i!==r?e.value=i:typeof r!==v&&i===r||e.setAttribute(o[f],i);var u,d,a,c}(u,n,r);for(var s=r.c.length;s--&&typeof n.c[s]===v;)typeof(d=u.lastChild)===p&&(Y(r.c[s]),d.remove());for(var l=0,g=n.c.length;l<g;l++)e(u,n.c[l],r.c[l],l)}}(e,f,o,0)}function j(e){if(typeof e===v)return e;if(typeof e.e===l){var t=L({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===l){var n=new e.init;typeof(e=n.render())===p&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var r=0,i=e.c.length;r<i;r++)e.c[r]=j(e.c[r]);return e}function S(e){var t=typeof e;if(t===a||t===c)return T(e);if(t===s||t===v)return T("");var n=document.createElement(e.e);if(typeof e.a===p)for(var r=Object.keys(e.a),i=r.length;i--;)r[i]===h?(e.eid=b(),x(e.eid,e.a[r[i]],n)):r[i]===y?I(e.a[r[i]],n):n.setAttribute(r[i],e.a[r[i]]);if(M(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)J(n,e.c[o]);return n}function k(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+i);return typeof t===a?t:k(e.parentNode)}}function x(t,n,r){r.setAttribute("data-"+i,t),f[t]=n;for(var u=Object.keys(n),c=u.length;c--;)d.includes(u[c])?r.addEventListener(c,f[t][u[c]]):o.includes(u[c])||(o.push(u[c]),e.addEventListener(u[c],function(e){var t=k(e.target);if(typeof t===a&&f[t]){var n=f[t][e.type];typeof n===l&&n(e)}}))}function I(e,t){if(typeof e!==v)for(var n=Object.keys(e),r=n.length;r--;)t.style[n[r]]=e[n[r]]}function T(e){return document.createTextNode(e)}function F(e,t,n){e.replaceChild(S(n),t)}function J(e,t){e.appendChild(S(t))}function R(e,t,n){return!1===e&&(typeof t.e===a||n===a||n===c)}function Y(e){if(M(e,"un"),typeof e!==v&&(z(e.eid),g(e.c)))for(var t=e.c.length;t--;)Y(e.c[t])}function z(e){typeof e===a&&delete f[e]}function B(e,t){for(var n=Object.keys(f[t]),r=n.length;r--;)d.includes(n[r])&&e.removeEventListener(n[r],f[t][n[r]])}function D(){for(var e;e=u.shift();)e()}function M(e,t){var n;typeof e===p&&typeof e[t]===l&&(u.push(e[t]),n=new Event("__LITERAL_LIFECYCLE__"),window.dispatchEvent(n))}module.exports={component:w,render:C,h:A},exports.h=A,exports.render=C,exports.component=w;
var e,t,n,r={},i="eid",o=[],f={},u=[],d=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",s="boolean",v="undefined",p="object",l="function",h="events",y="style",m="value";function g(e){return Array.isArray(e)}function b(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function E(e,t){for(var n=0,r=t.length;n<r;n++)g(t[n])?E(e,t[n]):e.push(t[n]);return e}function L(e,t){for(var n in t)e[n]=t[n];return e}function _(e,t,n){return L(L(e,t),n)}function A(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return{e:e,a:L({},t),c:E([],n)}}function C(i,o,f){void 0===f&&(f={}),r=_({},r,f),t=i,e=document.getElementById(o),n=j(i()),J(e,n),D(),window.addEventListener("__LITERAL_LIFECYCLE__",D)}function w(e){void 0===e&&(e={});var t=e.mounted;void 0===t&&(t=function(){});var n=e.updated;void 0===n&&(n=function(){});var r=e.unmounted;void 0===r&&(r=function(){});var i=e.methods;void 0===i&&(i=function(){});var o=e.render;void 0===o&&(o=function(){});var f=b();return function(e){return void 0===e&&(e={}),{id:f,init:function(){return this.id=f,this.props=e,this.getState=N,this.setState=O,this.mounted=t.bind(this),this.updated=n.bind(this),this.unmounted=r.bind(this),function(e,t){for(var n in typeof t===l&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,i),this.render=o.bind(this),this}}}}function N(){return r}function O(i){var o,f;r=_({},r,i),o=L({},n),f=j(t()),n=f,function e(t,n,r,i){var o=typeof n,f=typeof r,u=t.childNodes[i];if(f===v)J(t,n);else if(o===v)Y(r),function(e,t){e.removeChild(t)}(t,u);else if(R(r,n,o))F(t,u,n);else if(R(n,r,f))Y(r),F(t,u,n);else if(function(e,t,n,r){return n!==r||(n===a||n===c)&&e!==t||e.e!==t.e||e.id!==t.id}(n,r,o,f))Y(r),F(t,u,n);else if(typeof n.e===a){var d;!function(e,t,n){M(t,"up");for(var r,i,o=Object.keys(t.a),f=o.length;f--;)if(i=t.a[o[f]],r=n.a[o[f]],o[f]===y){if(c=typeof(d=r),(a=typeof(u=i))===p&&c===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),I(i,e)}else o[f]===h?(B(e,n.eid),z(n.eid),t.eid=b(),x(t.eid,i,e)):o[f]===m&&i!==r?e.value=i:typeof r!==v&&i===r||e.setAttribute(o[f],i);var u,d,a,c}(u,n,r);for(var s=r.c.length;s--&&typeof n.c[s]===v;)typeof(d=u.lastChild)===p&&(Y(r.c[s]),d.remove());for(var l=0,g=n.c.length;l<g;l++)e(u,n.c[l],r.c[l],l)}}(e,f,o,0)}function j(e){if(typeof e===v)return e;if(typeof e.e===l){var t=L({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===l){var n=new e.init;typeof(e=n.render())===p&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var r=0,i=e.c.length;r<i;r++)e.c[r]=j(e.c[r]);return e}function S(e){var t=typeof e;if(t===a||t===c)return T(e);if(t===s||t===v)return T("");var n=document.createElement(e.e);if(typeof e.a===p)for(var r=Object.keys(e.a),i=r.length;i--;)r[i]===h?(e.eid=b(),x(e.eid,e.a[r[i]],n)):r[i]===y?I(e.a[r[i]],n):n.setAttribute(r[i],e.a[r[i]]);if(M(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)J(n,e.c[o]);return n}function k(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+i);return typeof t===a?t:k(e.parentNode)}}function x(t,n,r){r.setAttribute("data-"+i,t),f[t]=n;for(var u=Object.keys(n),c=u.length;c--;)d.includes(u[c])?r.addEventListener(u[c],f[t][u[c]]):o.includes(u[c])||(o.push(u[c]),e.addEventListener(u[c],function(e){var t=k(e.target);if(typeof t===a&&f[t]){var n=f[t][e.type];typeof n===l&&n(e)}}))}function I(e,t){if(typeof e!==v)for(var n=Object.keys(e),r=n.length;r--;)t.style[n[r]]=e[n[r]]}function T(e){return document.createTextNode(e)}function F(e,t,n){e.replaceChild(S(n),t)}function J(e,t){e.appendChild(S(t))}function R(e,t,n){return!1===e&&(typeof t.e===a||n===a||n===c)}function Y(e){if(M(e,"un"),typeof e!==v&&(z(e.eid),g(e.c)))for(var t=e.c.length;t--;)Y(e.c[t])}function z(e){typeof e===a&&delete f[e]}function B(e,t){for(var n=Object.keys(f[t]),r=n.length;r--;)d.includes(n[r])&&e.removeEventListener(n[r],f[t][n[r]])}function D(){for(var e;e=u.shift();)e()}function M(e,t){var n;typeof e===p&&typeof e[t]===l&&(u.push(e[t]),n=new Event("__LITERAL_LIFECYCLE__"),window.dispatchEvent(n))}module.exports={component:w,render:C,h:A},exports.h=A,exports.render=C,exports.component=w;
//# sourceMappingURL=index.js.map

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

var e,t,n,i={},r="eid",o=[],f={},u=[],d=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",s="boolean",v="undefined",p="object",l="function",h="events",y="style",m="value";function g(e){return Array.isArray(e)}function b(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function E(e,t){for(var n=0,i=t.length;n<i;n++)g(t[n])?E(e,t[n]):e.push(t[n]);return e}function L(e,t){for(var n in t)e[n]=t[n];return e}function _(e,t,n){return L(L(e,t),n)}function A(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:L({},t),c:E([],n)}}function C(r,o,f){void 0===f&&(f={}),i=_({},i,f),t=r,e=document.getElementById(o),n=j(r()),J(e,n),D(),window.addEventListener("__LITERAL_LIFECYCLE__",D)}function w(e){void 0===e&&(e={});var t=e.mounted;void 0===t&&(t=function(){});var n=e.updated;void 0===n&&(n=function(){});var i=e.unmounted;void 0===i&&(i=function(){});var r=e.methods;void 0===r&&(r=function(){});var o=e.render;void 0===o&&(o=function(){});var f=b();return function(e){return void 0===e&&(e={}),{id:f,init:function(){return this.id=f,this.props=e,this.getState=N,this.setState=O,this.mounted=t.bind(this),this.updated=n.bind(this),this.unmounted=i.bind(this),function(e,t){for(var n in typeof t===l&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,r),this.render=o.bind(this),this}}}}function N(){return i}function O(r){var o,f;i=_({},i,r),o=L({},n),f=j(t()),n=f,function e(t,n,i,r){var o=typeof n,f=typeof i,u=t.childNodes[r];if(f===v)J(t,n);else if(o===v)Y(i),function(e,t){e.removeChild(t)}(t,u);else if(R(i,n,o))F(t,u,n);else if(R(n,i,f))Y(i),F(t,u,n);else if(function(e,t,n,i){return n!==i||(n===a||n===c)&&e!==t||e.e!==t.e||e.id!==t.id}(n,i,o,f))Y(i),F(t,u,n);else if(typeof n.e===a){var d;!function(e,t,n){M(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===y){if(c=typeof(d=i),(a=typeof(u=r))===p&&c===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),T(r,e)}else o[f]===h?(B(e,n.eid),z(n.eid),t.eid=b(),I(t.eid,r,e)):o[f]===m&&r!==i?e.value=r:typeof i!==v&&r===i||e.setAttribute(o[f],r);var u,d,a,c}(u,n,i);for(var s=i.c.length;s--&&typeof n.c[s]===v;)typeof(d=u.lastChild)===p&&(Y(i.c[s]),d.remove());for(var l=0,g=n.c.length;l<g;l++)e(u,n.c[l],i.c[l],l)}}(e,f,o,0)}function j(e){if(typeof e===v)return e;if(typeof e.e===l){var t=L({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===l){var n=new e.init;typeof(e=n.render())===p&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=j(e.c[i]);return e}function S(e){var t=typeof e;if(t===a||t===c)return x(e);if(t===s||t===v)return x("");var n=document.createElement(e.e);if(typeof e.a===p)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===h?(e.eid=b(),I(e.eid,e.a[i[r]],n)):i[r]===y?T(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(M(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)J(n,e.c[o]);return n}function k(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+r);return typeof t===a?t:k(e.parentNode)}}function I(t,n,i){i.setAttribute("data-"+r,t),f[t]=n;for(var u=Object.keys(n),c=u.length;c--;)d.includes(u[c])?i.addEventListener(c,f[t][u[c]]):o.includes(u[c])||(o.push(u[c]),e.addEventListener(u[c],function(e){var t=k(e.target);if(typeof t===a&&f[t]){var n=f[t][e.type];typeof n===l&&n(e)}}))}function T(e,t){if(typeof e!==v)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function x(e){return document.createTextNode(e)}function F(e,t,n){e.replaceChild(S(n),t)}function J(e,t){e.appendChild(S(t))}function R(e,t,n){return!1===e&&(typeof t.e===a||n===a||n===c)}function Y(e){if(M(e,"un"),typeof e!==v&&(z(e.eid),g(e.c)))for(var t=e.c.length;t--;)Y(e.c[t])}function z(e){typeof e===a&&delete f[e]}function B(e,t){for(var n=Object.keys(f[t]),i=n.length;i--;)d.includes(n[i])&&e.removeEventListener(n[i],f[t][n[i]])}function D(){for(var e;e=u.shift();)e()}function M(e,t){var n;typeof e===p&&typeof e[t]===l&&(u.push(e[t]),n=new Event("__LITERAL_LIFECYCLE__"),window.dispatchEvent(n))}module.exports={component:w,render:C,h:A};export{A as h,C as render,w as component};
var e,t,n,i={},r="eid",o=[],f={},u=[],d=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",c="number",s="boolean",v="undefined",p="object",l="function",h="events",y="style",m="value";function g(e){return Array.isArray(e)}function b(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function E(e,t){for(var n=0,i=t.length;n<i;n++)g(t[n])?E(e,t[n]):e.push(t[n]);return e}function L(e,t){for(var n in t)e[n]=t[n];return e}function _(e,t,n){return L(L(e,t),n)}function A(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:L({},t),c:E([],n)}}function C(r,o,f){void 0===f&&(f={}),i=_({},i,f),t=r,e=document.getElementById(o),n=j(r()),J(e,n),D(),window.addEventListener("__LITERAL_LIFECYCLE__",D)}function w(e){void 0===e&&(e={});var t=e.mounted;void 0===t&&(t=function(){});var n=e.updated;void 0===n&&(n=function(){});var i=e.unmounted;void 0===i&&(i=function(){});var r=e.methods;void 0===r&&(r=function(){});var o=e.render;void 0===o&&(o=function(){});var f=b();return function(e){return void 0===e&&(e={}),{id:f,init:function(){return this.id=f,this.props=e,this.getState=N,this.setState=O,this.mounted=t.bind(this),this.updated=n.bind(this),this.unmounted=i.bind(this),function(e,t){for(var n in typeof t===l&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,r),this.render=o.bind(this),this}}}}function N(){return i}function O(r){var o,f;i=_({},i,r),o=L({},n),f=j(t()),n=f,function e(t,n,i,r){var o=typeof n,f=typeof i,u=t.childNodes[r];if(f===v)J(t,n);else if(o===v)Y(i),function(e,t){e.removeChild(t)}(t,u);else if(R(i,n,o))F(t,u,n);else if(R(n,i,f))Y(i),F(t,u,n);else if(function(e,t,n,i){return n!==i||(n===a||n===c)&&e!==t||e.e!==t.e||e.id!==t.id}(n,i,o,f))Y(i),F(t,u,n);else if(typeof n.e===a){var d;!function(e,t,n){M(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===y){if(c=typeof(d=i),(a=typeof(u=r))===p&&c===p&&JSON.stringify(u)===JSON.stringify(d)||a===v&&c===v)continue;e.removeAttribute(o[f]),T(r,e)}else o[f]===h?(B(e,n.eid),z(n.eid),t.eid=b(),I(t.eid,r,e)):o[f]===m&&r!==i?e.value=r:typeof i!==v&&r===i||e.setAttribute(o[f],r);var u,d,a,c}(u,n,i);for(var s=i.c.length;s--&&typeof n.c[s]===v;)typeof(d=u.lastChild)===p&&(Y(i.c[s]),d.remove());for(var l=0,g=n.c.length;l<g;l++)e(u,n.c[l],i.c[l],l)}}(e,f,o,0)}function j(e){if(typeof e===v)return e;if(typeof e.e===l){var t=L({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===l){var n=new e.init;typeof(e=n.render())===p&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=j(e.c[i]);return e}function S(e){var t=typeof e;if(t===a||t===c)return x(e);if(t===s||t===v)return x("");var n=document.createElement(e.e);if(typeof e.a===p)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===h?(e.eid=b(),I(e.eid,e.a[i[r]],n)):i[r]===y?T(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(M(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)J(n,e.c[o]);return n}function k(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+r);return typeof t===a?t:k(e.parentNode)}}function I(t,n,i){i.setAttribute("data-"+r,t),f[t]=n;for(var u=Object.keys(n),c=u.length;c--;)d.includes(u[c])?i.addEventListener(u[c],f[t][u[c]]):o.includes(u[c])||(o.push(u[c]),e.addEventListener(u[c],function(e){var t=k(e.target);if(typeof t===a&&f[t]){var n=f[t][e.type];typeof n===l&&n(e)}}))}function T(e,t){if(typeof e!==v)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function x(e){return document.createTextNode(e)}function F(e,t,n){e.replaceChild(S(n),t)}function J(e,t){e.appendChild(S(t))}function R(e,t,n){return!1===e&&(typeof t.e===a||n===a||n===c)}function Y(e){if(M(e,"un"),typeof e!==v&&(z(e.eid),g(e.c)))for(var t=e.c.length;t--;)Y(e.c[t])}function z(e){typeof e===a&&delete f[e]}function B(e,t){for(var n=Object.keys(f[t]),i=n.length;i--;)d.includes(n[i])&&e.removeEventListener(n[i],f[t][n[i]])}function D(){for(var e;e=u.shift();)e()}function M(e,t){var n;typeof e===p&&typeof e[t]===l&&(u.push(e[t]),n=new Event("__LITERAL_LIFECYCLE__"),window.dispatchEvent(n))}module.exports={component:w,render:C,h:A};export{A as h,C as render,w as component};
//# sourceMappingURL=index.m.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.literaljs={})}(this,function(e){var t,n,i,r={},o="eid",f=[],u={},d=[],c=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",s="number",v="boolean",p="undefined",l="object",h="function",y="events",m="style",b="value";function g(e){return Array.isArray(e)}function E(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function L(e,t){for(var n=0,i=t.length;n<i;n++)g(t[n])?L(e,t[n]):e.push(t[n]);return e}function _(e,t){for(var n in t)e[n]=t[n];return e}function A(e,t,n){return _(_(e,t),n)}function j(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:_({},t),c:L([],n)}}function C(e,o,f){void 0===f&&(f={}),r=A({},r,f),n=e,t=document.getElementById(o),i=S(e()),R(t,i),M(),window.addEventListener("__LITERAL_LIFECYCLE__",M)}function w(e){void 0===e&&(e={});var t=e.mounted;void 0===t&&(t=function(){});var n=e.updated;void 0===n&&(n=function(){});var i=e.unmounted;void 0===i&&(i=function(){});var r=e.methods;void 0===r&&(r=function(){});var o=e.render;void 0===o&&(o=function(){});var f=E();return function(e){return void 0===e&&(e={}),{id:f,init:function(){return this.id=f,this.props=e,this.getState=N,this.setState=O,this.mounted=t.bind(this),this.updated=n.bind(this),this.unmounted=i.bind(this),function(e,t){for(var n in typeof t===h&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,r),this.render=o.bind(this),this}}}}function N(){return r}function O(e){var o,f;r=A({},r,e),o=_({},i),f=S(n()),i=f,function e(t,n,i,r){var o=typeof n,f=typeof i,u=t.childNodes[r];if(f===p)R(t,n);else if(o===p)z(i),function(e,t){e.removeChild(t)}(t,u);else if(Y(i,n,o))J(t,u,n);else if(Y(n,i,f))z(i),J(t,u,n);else if(function(e,t,n,i){return n!==i||(n===a||n===s)&&e!==t||e.e!==t.e||e.id!==t.id}(n,i,o,f))z(i),J(t,u,n);else if(typeof n.e===a){var d;!function(e,t,n){q(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===m){if(a=typeof(d=i),(c=typeof(u=r))===l&&a===l&&JSON.stringify(u)===JSON.stringify(d)||c===p&&a===p)continue;e.removeAttribute(o[f]),T(r,e)}else o[f]===y?(D(e,n.eid),B(n.eid),t.eid=E(),I(t.eid,r,e)):o[f]===b&&r!==i?e.value=r:typeof i!==p&&r===i||e.setAttribute(o[f],r);var u,d,c,a}(u,n,i);for(var c=i.c.length;c--&&typeof n.c[c]===p;)typeof(d=u.lastChild)===l&&(z(i.c[c]),d.remove());for(var v=0,h=n.c.length;v<h;v++)e(u,n.c[v],i.c[v],v)}}(t,f,o,0)}function S(e){if(typeof e===p)return e;if(typeof e.e===h){var t=_({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===h){var n=new e.init;typeof(e=n.render())===l&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=S(e.c[i]);return e}function k(e){var t=typeof e;if(t===a||t===s)return F(e);if(t===v||t===p)return F("");var n=document.createElement(e.e);if(typeof e.a===l)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===y?(e.eid=E(),I(e.eid,e.a[i[r]],n)):i[r]===m?T(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(q(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)R(n,e.c[o]);return n}function x(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+o);return typeof t===a?t:x(e.parentNode)}}function I(e,n,i){i.setAttribute("data-"+o,e),u[e]=n;for(var r=Object.keys(n),d=r.length;d--;)c.includes(r[d])?i.addEventListener(d,u[e][r[d]]):f.includes(r[d])||(f.push(r[d]),t.addEventListener(r[d],function(e){var t=x(e.target);if(typeof t===a&&u[t]){var n=u[t][e.type];typeof n===h&&n(e)}}))}function T(e,t){if(typeof e!==p)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function F(e){return document.createTextNode(e)}function J(e,t,n){e.replaceChild(k(n),t)}function R(e,t){e.appendChild(k(t))}function Y(e,t,n){return!1===e&&(typeof t.e===a||n===a||n===s)}function z(e){if(q(e,"un"),typeof e!==p&&(B(e.eid),g(e.c)))for(var t=e.c.length;t--;)z(e.c[t])}function B(e){typeof e===a&&delete u[e]}function D(e,t){for(var n=Object.keys(u[t]),i=n.length;i--;)c.includes(n[i])&&e.removeEventListener(n[i],u[t][n[i]])}function M(){for(var e;e=d.shift();)e()}function q(e,t){var n;typeof e===l&&typeof e[t]===h&&(d.push(e[t]),n=new Event("__LITERAL_LIFECYCLE__"),window.dispatchEvent(n))}module.exports={component:w,render:C,h:j},e.h=j,e.render=C,e.component=w});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.literaljs={})}(this,function(e){var t,n,i,r={},o="eid",f=[],u={},d=[],c=["abort","blur","error","focus","load","mouseenter","mouseleave","resize","scroll","unload"],a="string",s="number",v="boolean",p="undefined",l="object",h="function",y="events",m="style",b="value";function g(e){return Array.isArray(e)}function E(){return Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}function L(e,t){for(var n=0,i=t.length;n<i;n++)g(t[n])?L(e,t[n]):e.push(t[n]);return e}function _(e,t){for(var n in t)e[n]=t[n];return e}function A(e,t,n){return _(_(e,t),n)}function j(e,t){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return{e:e,a:_({},t),c:L([],n)}}function C(e,o,f){void 0===f&&(f={}),r=A({},r,f),n=e,t=document.getElementById(o),i=S(e()),R(t,i),M(),window.addEventListener("__LITERAL_LIFECYCLE__",M)}function w(e){void 0===e&&(e={});var t=e.mounted;void 0===t&&(t=function(){});var n=e.updated;void 0===n&&(n=function(){});var i=e.unmounted;void 0===i&&(i=function(){});var r=e.methods;void 0===r&&(r=function(){});var o=e.render;void 0===o&&(o=function(){});var f=E();return function(e){return void 0===e&&(e={}),{id:f,init:function(){return this.id=f,this.props=e,this.getState=N,this.setState=O,this.mounted=t.bind(this),this.updated=n.bind(this),this.unmounted=i.bind(this),function(e,t){for(var n in typeof t===h&&(t=t.bind(e)()),t)e[n]=t[n].bind(e)}(this,r),this.render=o.bind(this),this}}}}function N(){return r}function O(e){var o,f;r=A({},r,e),o=_({},i),f=S(n()),i=f,function e(t,n,i,r){var o=typeof n,f=typeof i,u=t.childNodes[r];if(f===p)R(t,n);else if(o===p)z(i),function(e,t){e.removeChild(t)}(t,u);else if(Y(i,n,o))J(t,u,n);else if(Y(n,i,f))z(i),J(t,u,n);else if(function(e,t,n,i){return n!==i||(n===a||n===s)&&e!==t||e.e!==t.e||e.id!==t.id}(n,i,o,f))z(i),J(t,u,n);else if(typeof n.e===a){var d;!function(e,t,n){q(t,"up");for(var i,r,o=Object.keys(t.a),f=o.length;f--;)if(r=t.a[o[f]],i=n.a[o[f]],o[f]===m){if(a=typeof(d=i),(c=typeof(u=r))===l&&a===l&&JSON.stringify(u)===JSON.stringify(d)||c===p&&a===p)continue;e.removeAttribute(o[f]),T(r,e)}else o[f]===y?(D(e,n.eid),B(n.eid),t.eid=E(),I(t.eid,r,e)):o[f]===b&&r!==i?e.value=r:typeof i!==p&&r===i||e.setAttribute(o[f],r);var u,d,c,a}(u,n,i);for(var c=i.c.length;c--&&typeof n.c[c]===p;)typeof(d=u.lastChild)===l&&(z(i.c[c]),d.remove());for(var v=0,h=n.c.length;v<h;v++)e(u,n.c[v],i.c[v],v)}}(t,f,o,0)}function S(e){if(typeof e===p)return e;if(typeof e.e===h){var t=_({},e.a.props);delete e.a.props,e=e.e(t)}if(typeof e.init===h){var n=new e.init;typeof(e=n.render())===l&&(e.id=n.id,e.m=n.mounted,e.up=n.updated,e.un=n.unmounted)}if(g(e.c))for(var i=0,r=e.c.length;i<r;i++)e.c[i]=S(e.c[i]);return e}function k(e){var t=typeof e;if(t===a||t===s)return F(e);if(t===v||t===p)return F("");var n=document.createElement(e.e);if(typeof e.a===l)for(var i=Object.keys(e.a),r=i.length;r--;)i[r]===y?(e.eid=E(),I(e.eid,e.a[i[r]],n)):i[r]===m?T(e.a[i[r]],n):n.setAttribute(i[r],e.a[i[r]]);if(q(e,"m"),g(e.c))for(var o=0,f=e.c.length;o<f;o++)R(n,e.c[o]);return n}function x(e){if("#document"!==e.parentNode.nodeName){var t=e.getAttribute("data-"+o);return typeof t===a?t:x(e.parentNode)}}function I(e,n,i){i.setAttribute("data-"+o,e),u[e]=n;for(var r=Object.keys(n),d=r.length;d--;)c.includes(r[d])?i.addEventListener(r[d],u[e][r[d]]):f.includes(r[d])||(f.push(r[d]),t.addEventListener(r[d],function(e){var t=x(e.target);if(typeof t===a&&u[t]){var n=u[t][e.type];typeof n===h&&n(e)}}))}function T(e,t){if(typeof e!==p)for(var n=Object.keys(e),i=n.length;i--;)t.style[n[i]]=e[n[i]]}function F(e){return document.createTextNode(e)}function J(e,t,n){e.replaceChild(k(n),t)}function R(e,t){e.appendChild(k(t))}function Y(e,t,n){return!1===e&&(typeof t.e===a||n===a||n===s)}function z(e){if(q(e,"un"),typeof e!==p&&(B(e.eid),g(e.c)))for(var t=e.c.length;t--;)z(e.c[t])}function B(e){typeof e===a&&delete u[e]}function D(e,t){for(var n=Object.keys(u[t]),i=n.length;i--;)c.includes(n[i])&&e.removeEventListener(n[i],u[t][n[i]])}function M(){for(var e;e=d.shift();)e()}function q(e,t){var n;typeof e===l&&typeof e[t]===h&&(d.push(e[t]),n=new Event("__LITERAL_LIFECYCLE__"),window.dispatchEvent(n))}module.exports={component:w,render:C,h:j},e.h=j,e.render=C,e.component=w});
//# sourceMappingURL=index.umd.js.map
{
"name": "literaljs",
"version": "6.0.2",
"version": "6.0.3",
"description": "A small JavaScript library for building reactive user interfaces.",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -12,11 +12,11 @@ <p align="center">

Recent 6.0.2 microbundle:
Recent 6.0.3 microbundle:
```js
Build "literaljs" to build:
1821 B: index.js.gz
1820 B: index.js.gz
1587 B: index.js.br
1824 B: index.m.js.gz
1590 B: index.m.js.br
1889 B: index.umd.js.gz
1638 B: index.umd.js.br
1823 B: index.m.js.gz
1591 B: index.m.js.br
1888 B: index.umd.js.gz
1636 B: index.umd.js.br
```

@@ -23,0 +23,0 @@ ### [Features and stuff](#features)

Sorry, the diff of this file is not supported yet

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