Skip to main content
The Deno 2 Release Candidate is here
Learn more
method ItemHelper.prototype.reparentItemAndChildren
Re-export
import { ItemHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/mod.ts";

Generate new unique ids for child items while preserving hierarchy

Parameters

rootItem: Item

Base/primary item

itemWithChildren: Item[]

Primary item + children of primary item

Returns

Item array with updated IDs