MCPcopy Create free account
hub / github.com/MMmaXingXing/mini-vue / normalizeObjectSlots

Function normalizeObjectSlots

code/src/runtime-core/componentSlots.ts:13–20  ·  view source on GitHub ↗
(children, slots)

Source from the content-addressed store, hash-verified

11};
12
13const normalizeObjectSlots = (children, slots) => {
14 for (const key in children) {
15 const value = children[key];
16 slots[key] = (props) => normalizeSlotValue(value(props));
17 }
18
19 slots = slots;
20};
21
22const normalizeSlotValue = (value) => {
23 return Array.isArray(value) ? value : [value];

Callers 1

initSlotsFunction · 0.70

Calls 2

valueFunction · 0.85
normalizeSlotValueFunction · 0.70

Tested by

no test coverage detected