carbon-components-svelte/docs
Eric Liu 5f1e8de1e1 Re-work toHierarchy utility
Refactor `toHiearchy` to be more generic, performant

- Use callback to "pick" generic parent ID property instead of requiring that `pid` be hardcoded`
- Account for edge cases of an invalid parent ID
- Use Map to store node children for lookups
- Use one pass instead of removing empty nodes at the very end
- DX: use generics to type `toHierarchy`
- Make `toHierarchy` even more generic (reusable with `RecursiveList`)

Co-Authored-By: Bram <bramhavers@gmail.com>
2024-12-09 12:20:20 -08:00
..
public docs: remove vercel, add Deploy to Render button (#832) 2021-09-29 09:49:15 -07:00
scripts build(docs): use node: prefix [ci skip] 2024-11-12 09:52:20 -08:00
src Re-work toHierarchy utility 2024-12-09 12:20:20 -08:00
.gitignore docs: implement rudimentary full-text search (#1849) 2023-11-20 13:39:06 -08:00
index.html docs: move IBM analytics script to _layout.svelte 2024-11-10 11:49:16 -08:00
package-lock.json Re-work toHierarchy utility 2024-12-09 12:20:20 -08:00
package.json chore(docs): bump deps 2024-11-09 11:26:43 -08:00
svelte.config.js build(docs): use node: prefix [ci skip] 2024-11-12 09:52:20 -08:00
vite.config.js Switch from svite to vite + vite-plugin-svelte. (#962) 2021-12-31 10:11:48 -08:00