UNPKG

@ea-lab/reactive-json

Version:

A REACT-based lib that transforms JSON (or YAML) into interactive HTML markup.

27 lines (26 loc) 690 B
function l(m) { const o = { action: {}, dataMapping: {}, dataProcessor: {}, element: {}, hook: {}, reaction: {}, utility: {} }; m.forEach((r) => { for (const [e, n] of Object.entries(r)) { o.hasOwnProperty(e) || (o[e] = {}); for (const [t, c] of Object.entries(n)) o[e][t] = c; } }); const a = Object.entries(o.dataProcessor); return a.sort((r, e) => { const [n, t] = r, [c, s] = e, d = (t == null ? void 0 : t.order) || 0, f = (s == null ? void 0 : s.order) || 0, i = d - f; return i !== 0 ? i : n.localeCompare(c); }), o.dataProcessor = Object.fromEntries(a), o; } export { l as mergeComponentCollections };