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

Update a root items _id property value to be unique

Parameters

itemWithChildren: Item[]

Item to update root items _id property

optional
newId: string

Optional: new id to use

Returns

string

New root id