MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / _toHTML

Function _toHTML

tools/common/_hyperscript.iife.js:1773–1793  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1771 }
1772 };
1773 function _toHTML(value) {
1774 if (value instanceof Array) {
1775 return value.map((item) => _toHTML(item)).join("");
1776 }
1777 if (value instanceof HTMLElement) {
1778 return value.outerHTML;
1779 }
1780 if (value instanceof NodeList) {
1781 var result = "";
1782 for (var i = 0; i < value.length; i++) {
1783 if (value[i] instanceof HTMLElement) {
1784 result += value[i].outerHTML;
1785 }
1786 }
1787 return result;
1788 }
1789 if (value.toString) {
1790 return value.toString();
1791 }
1792 return "";
1793 }
1794 var conversions = {
1795 dynamicResolvers: [
1796 // Fixed-point number conversion

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected