MCPcopy Create free account
hub / github.com/Nynxz/ComfyUI-IdeogramHelper / normalizeObjectSlots

Function normalizeObjectSlots

web/main.js:4535–4547  ·  view source on GitHub ↗
(rawSlots, slots, instance)

Source from the content-addressed store, hash-verified

4533 return normalized;
4534};
4535const normalizeObjectSlots = (rawSlots, slots, instance) => {
4536 const ctx = rawSlots._ctx;
4537 for (const key in rawSlots) {
4538 if (isInternalKey(key)) continue;
4539 const value = rawSlots[key];
4540 if (isFunction(value)) {
4541 slots[key] = normalizeSlot(key, value, ctx);
4542 } else if (value != null) {
4543 const normalized = normalizeSlotValue(value);
4544 slots[key] = () => normalized;
4545 }
4546 }
4547};
4548const normalizeVNodeSlots = (instance, children) => {
4549 const normalized = normalizeSlotValue(children);
4550 instance.slots.default = () => normalized;

Callers 2

initSlotsFunction · 0.85
updateSlotsFunction · 0.85

Calls 4

isInternalKeyFunction · 0.85
isFunctionFunction · 0.85
normalizeSlotFunction · 0.85
normalizeSlotValueFunction · 0.85

Tested by

no test coverage detected