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

Function _toHTML

src/core/runtime/conversions.js:42–62  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

40}
41
42function _toHTML(value) {
43 if (value instanceof Array) {
44 return value.map(item => _toHTML(item)).join("");
45 }
46 if (value instanceof HTMLElement) {
47 return value.outerHTML;
48 }
49 if (value instanceof NodeList) {
50 var result = "";
51 for (var i = 0; i < value.length; i++) {
52 if (value[i] instanceof HTMLElement) {
53 result += value[i].outerHTML;
54 }
55 }
56 return result;
57 }
58 if (value.toString) {
59 return value.toString();
60 }
61 return "";
62}
63
64export const conversions = {
65 dynamicResolvers: [

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected