UNPKG

dk-plus

Version:
42 lines (41 loc) 795 B
const a = (r, s) => { const l = [], c = { symbol: (t) => { const e = t.children; i(e); }, object: (t) => { if (t.type.name === s) { const o = t.props; if (t.children) { const n = t.children.default(); o.children = n; } l.push(o); } }, default: (t) => { console.warn( `[ReferenceError] The ${t.type} label is not supported, please use ${s}.` ); } }, i = (t) => { const e = t.length; let o = 0; const n = c.default; for (; o < e; ) { const d = t[o], h = typeof d.type; (c[h] || n)(d), o++; } }; return ((t) => { if (t.default) { const e = t.default(); i(e); } return l; })(r); }; export { a as getSlotList };