@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 580 B
JavaScript
const e=e=>{let t=[],n=new Set;for(let t of e.title)n.add(t.localeCode);for(let t of e.alt)n.add(t.localeCode);for(let t of e.description||[])n.add(t.localeCode);for(let t of e.summary||[])n.add(t.localeCode);for(let r of n)t.push({locale_code:r,title:e.title.find(e=>e.localeCode===r)?.value??null,alt:e.alt.find(e=>e.localeCode===r)?.value??null,description:e.description?.find(e=>e.localeCode===r)?.value??null,summary:e.summary?.find(e=>e.localeCode===r)?.value??null,media_id:e.mediaId});return t};export{e as default};
//# sourceMappingURL=prepare-media-translations.mjs.map