UNPKG

@fontoxml/fontoxml-development-tools

Version:

Development tools for Fonto.

13 lines (11 loc) 259 B
export default function mergeItems(...lists) { const itemById = lists.reduce((byId, list) => { if (list) { for (const item of list) { byId[item.id] = item; } } return byId; }, {}); return Object.keys(itemById).map((id) => itemById[id]); }