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

rendering-recursive-server-side

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rendering-recursive-server-side - npm Package Compare versions

Comparing version 0.0.1 to 0.1.1

2

index.js

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

!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.buildRender=r.buildRender},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.buildRender=r.buildRender},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(5);t.buildRender=function(e){if(e){var t=i.default(e),n=r.default(e,t);return function(e){return void 0===e&&(e={}),e?n(e).children:null}}return null}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);t.default=function(e,t){var n=function(u,c){void 0===u&&(u={});var s=u.children,a=u.HTMLTag,l=u.value,f=i(u,["children","HTMLTag","value"]),d=c||e.createDocumentFragment(),p=s?s.filter((function(e){return!!e})):[];if(!p.length)return function(n){return a?n.append(t(r({HTMLTag:a,value:l},f))):l?n.append(e.createTextNode(l)):f[0]&&n.append(f[0]),n}(d);var b=a?t(r({HTMLTag:a,value:l},f)):null,h=e.createDocumentFragment(),y=b||h;return p.forEach((function(t){"string"==typeof t?o.isSvg(t)?b?b.innerHTML=t:console.warn("SVG element can be child only of HTMLElement"):y.append(e.createTextNode(t)):n(t,h)})),b?(b.append(h),d.append(b)):d.append(h),d};return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSvg=function(e){return/^<svg[\w\s:.;&/"-=<>\\]*<\/svg>$/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){return function(t){var n=void 0===t?{style:{},attributes:{},eventHandlers:{}}:t,r=n.HTMLTag,i=n.value,o=n.className,u=void 0===o?"":o,c=n.eventHandlers,s=void 0===c?{}:c,a=n.innerHTML,l=n.style,f=void 0===l?{}:l,d=n.attributes,p=void 0===d?{}:d,b=e.createElement(r);return i&&b.append(e.createTextNode(i)),u.split(" ").forEach((function(e){return e&&b.classList.add(e)})),a&&(b.innerHTML=a),Object.keys(f).forEach((function(e){b.style[e]=f[e]})),Object.keys(p).forEach((function(e){b.setAttribute(e,p[e])})),Object.keys(s).forEach((function(e){b.addEventListener(e.slice(2).toLowerCase(),s[e])})),b}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(8),o=r.buildRender(new i.SSRDocument);t.default=function(e){return void 0===e&&(e={}),o(e).map((function(e){return e.toString()})).join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=function(){function e(){}return e.prototype.createElement=function(e,t){return new r.SSRElement(e,t)},e.prototype.createDocumentFragment=function(){return new i.SSRFragment},e.prototype.createTextNode=function(e){return void 0===e&&(e=""),e},e}();t.SSRDocument=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.list=[]}return Object.defineProperty(e.prototype,"className",{get:function(){return this.list.join(" ")},enumerable:!0,configurable:!0}),e.prototype.add=function(e){this.list.push(e)},e}(),i=function(){function e(e,t){var n=(void 0===t?{}:t).selfClosing;this.tagName=e,this.tagName=e,this.selfClosing=n,this._children=[],this.classList=new r,this.tagName=e,this._attributes={},this.style={}}return Object.defineProperty(e.prototype,"children",{get:function(){return this.renderChildren()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerText",{get:function(){return this.renderChildren()},set:function(e){"string"==typeof e&&this._children.push(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerHTML",{get:function(){return this.renderChildren()},set:function(e){"string"==typeof e&&this._children.push(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this.classList.className},enumerable:!0,configurable:!0}),e.prototype.append=function(e){e&&this._children.push(e.toString())},e.prototype.toString=function(){var e=this.tags,t=e[0],n=e[1];return t+this.renderChildren()+n},e.prototype.renderChildren=function(){return this._children.map((function(e){return e.toString()})).join("")},Object.defineProperty(e.prototype,"attributes",{get:function(){var e=this,t=JSON.stringify(this.style);return Object.keys(this._attributes).reduce((function(t,n){return t+=n?" "+n+'="'+e._attributes[n]+'"':" "+n}),"").concat(this.className?' class="'+this.className+'"':"").concat(t.substring(1,t.length-1))},enumerable:!0,configurable:!0}),e.prototype.setAttribute=function(e,t){this._attributes[e]=t},e.prototype.addEventListener=function(){return null},Object.defineProperty(e.prototype,"tags",{get:function(){var e=this.tagName,t=!this.selfClosing;return e?["<"+e+this.attributes+(t?"":"/")+">","<"+(t?"/":"")+e+">"]:["",""]},enumerable:!0,configurable:!0}),e}();t.SSRElement=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.children=[]}return e.prototype.append=function(e){e&&this.children.push(e.toString())},e.prototype.toString=function(){return this.children.map((function(e){return e.toString()})).join("")},e}();t.SSRFragment=r}]));
!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.buildRender=r.buildRender},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.buildRender=r.buildRender},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(5);t.buildRender=function(e){if(e){var t=i.default(e),n=r.default(e,t);return function(e){return void 0===e&&(e={}),e?n(e).children:null}}return null}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);t.default=function(e,t){var n=function(u,c){void 0===u&&(u={});var a=u.children,s=u.HTMLTag,l=u.value,f=i(u,["children","HTMLTag","value"]),d=c||e.createDocumentFragment(),p=a?a.filter((function(e){return!!e})):[];if(!p.length)return function(n){return s?n.append(t(r({HTMLTag:s,value:l},f))):l?n.append(e.createTextNode(l)):f[0]&&n.append(f[0]),n}(d);var y=s?t(r({HTMLTag:s,value:l},f)):null,b=e.createDocumentFragment(),h=y||b;return p.forEach((function(t){"string"==typeof t?o.isSvg(t)?y?y.innerHTML=t:console.warn("SVG element can be child only of HTMLElement"):h.append(e.createTextNode(t)):n(t,b)})),y?(y.append(b),d.append(y)):d.append(b),d};return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSvg=function(e){return/^<svg[\w\s:.;&/"-=<>\\]*<\/svg>$/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){return void 0===t&&(t=!0),function(n){var r=void 0===n?{style:{},attributes:{},eventHandlers:{}}:n,i=r.HTMLTag,o=r.value,u=r.className,c=void 0===u?"":u,a=r.eventHandlers,s=void 0===a?{}:a,l=r.innerHTML,f=r.style,d=void 0===f?{}:f,p=r.attributes,y=void 0===p?{}:p,b=e.createElement(i);return o&&b.append(e.createTextNode(o)),c.split(" ").forEach((function(e){return e&&b.classList.add(e)})),l&&(b.innerHTML=l),Object.keys(d).forEach((function(e){b.style[e]=d[e]})),Object.keys(y).forEach((function(e){b.setAttribute(e,y[e])})),Object.keys(s).forEach((function(e){var n=s[e],r=Array.isArray(n)?n:[],i=r[0],o=void 0===i?n:i,u=r[1],c=void 0===u?t:u;b.addEventListener(e.slice(2).toLowerCase(),o,c)})),b}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(8),o=r.buildRender(new i.SSRDocument);t.default=function(e){return void 0===e&&(e={}),o(e).map((function(e){return e.toString()})).join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=function(){function e(){}return e.prototype.createElement=function(e,t){return new r.SSRElement(e,t)},e.prototype.createDocumentFragment=function(){return new i.SSRFragment},e.prototype.createTextNode=function(e){return void 0===e&&(e=""),e},e}();t.SSRDocument=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.list=[]}return Object.defineProperty(e.prototype,"className",{get:function(){return this.list.join(" ")},enumerable:!0,configurable:!0}),e.prototype.add=function(e){this.list.push(e)},e}(),i=function(){function e(e,t){var n=(void 0===t?{}:t).selfClosing;this.tagName=e,this.tagName=e,this.selfClosing=n,this._children=[],this.classList=new r,this.tagName=e,this._attributes={},this.style={}}return Object.defineProperty(e.prototype,"children",{get:function(){return this.renderChildren()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerText",{get:function(){return this.renderChildren()},set:function(e){"string"==typeof e&&this._children.push(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerHTML",{get:function(){return this.renderChildren()},set:function(e){"string"==typeof e&&this._children.push(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this.classList.className},enumerable:!0,configurable:!0}),e.prototype.append=function(e){e&&this._children.push(e.toString())},e.prototype.toString=function(){var e=this.tags,t=e[0],n=e[1];return t+this.renderChildren()+n},e.prototype.renderChildren=function(){return this._children.map((function(e){return e.toString()})).join("")},Object.defineProperty(e.prototype,"attributes",{get:function(){var e=this,t=JSON.stringify(this.style);return t=t.substring(1,t.length-1).replace(/["']/gi,"").replace(/[,]/gi,"; ").replace(/\s?(([a-z])([A-Z]))(\w*:)/g,(function(e,t,n,r,i){return n+"-"+r.toLowerCase()+i})),Object.keys(this._attributes).reduce((function(t,n){return t+=n?" "+n+'="'+e._attributes[n]+'"':" "+n}),"").concat(this.className?' class="'+this.className+'"':"").concat(t?' style="'+t+'"':"")},enumerable:!0,configurable:!0}),e.prototype.setAttribute=function(e,t){this._attributes[e]=t},e.prototype.addEventListener=function(){return null},Object.defineProperty(e.prototype,"tags",{get:function(){var e=this.tagName,t=!this.selfClosing;return e?["<"+e+this.attributes+(t?"":"/")+">","<"+(t?"/":"")+e+">"]:["",""]},enumerable:!0,configurable:!0}),e}();t.SSRElement=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.children=[]}return e.prototype.append=function(e){e&&this.children.push(e.toString())},e.prototype.toString=function(){return this.children.map((function(e){return e.toString()})).join("")},e}();t.SSRFragment=r}]));
{
"name": "rendering-recursive-server-side",
"version": "0.0.1",
"version": "0.1.1",
"description": "Recursive rendering of html nodes for server side",

@@ -27,3 +27,3 @@ "keywords": [

],
"gitHead": "6e85206a4c324608a5aa31c60e12dc027b908fef"
"gitHead": "b7e9922f4e211d4d8671ee187461f2b8e34c62ef"
}
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