MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / getPropertyPrintableValue

Method getPropertyPrintableValue

src/LGraphCanvas.ts:1326–1344  ·  view source on GitHub ↗
(value: unknown, values: unknown[] | object | undefined)

Source from the content-addressed store, hash-verified

1324 }
1325
1326 static getPropertyPrintableValue(value: unknown, values: unknown[] | object | undefined): string | undefined {
1327 if (!values) return String(value)
1328
1329 if (Array.isArray(values)) {
1330 return String(value)
1331 }
1332
1333 if (typeof values === "object") {
1334 let desc_value = ""
1335 for (const k in values) {
1336 // @ts-expect-error deprecated #578
1337 if (values[k] != value) continue
1338
1339 desc_value = k
1340 break
1341 }
1342 return `${String(value)} (${desc_value})`
1343 }
1344 }
1345
1346 static onMenuNodeCollapse(
1347 value: IContextMenuValue,

Callers 2

createPanelMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected