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

Function _toHTML

www/js/_hyperscript.js:1783–1803  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected