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

Function _toHTML

www/js/_hyperscript.esm.js:1781–1801  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected