UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

15 lines (14 loc) 321 B
//#region src/Toc/utils.ts const mapItems = (items) => items.map((item) => ({ children: item.children?.map((child) => ({ href: `#${child.id}`, key: child.id, title: child?.title })), href: `#${item.id}`, key: item.id, title: item.title })); //#endregion export { mapItems }; //# sourceMappingURL=utils.mjs.map