MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _toHTML

Function _toHTML

www/js/_hyperscript-max.js:1782–1802  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1780 }
1781 };
1782 function _toHTML(value) {
1783 if (value instanceof Array) {
1784 return value.map((item) => _toHTML(item)).join("");
1785 }
1786 if (value instanceof HTMLElement) {
1787 return value.outerHTML;
1788 }
1789 if (value instanceof NodeList) {
1790 var result = "";
1791 for (var i = 0; i < value.length; i++) {
1792 if (value[i] instanceof HTMLElement) {
1793 result += value[i].outerHTML;
1794 }
1795 }
1796 return result;
1797 }
1798 if (value.toString) {
1799 return value.toString();
1800 }
1801 return "";
1802 }
1803 var conversions = {
1804 dynamicResolvers: [
1805 // Fixed-point number conversion

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected