MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / createPropPath

Method createPropPath

tools/nodered2mcu.js:1819–1827  ·  view source on GitHub ↗
(prop, code, indent)

Source from the content-addressed store, hash-verified

1817 return this.splitProp(prop).join("");
1818 }
1819 createPropPath(prop, code, indent) {
1820 const parts = this.splitProp(prop);
1821 if (parts.length > 1) {
1822 for (let i = 0, path = ""; i < parts.length - 1; i++) {
1823 path += parts[i];
1824 code.push(`${indent}msg${path} ??= {};`);
1825 }
1826 }
1827 }
1828 prepareUI(config, nodes) {
1829 if (!nodes.ui_base)
1830 throw new Error("ui_base node not found. required for dashboard nodes.")

Callers 1

prepareNodeMethod · 0.80

Calls 2

splitPropMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected